Fix lambda bug in AudioDocument and ImageDocument
This commit is contained in:
parent
8b3b2f8156
commit
f87fd12e9b
2 changed files with 2 additions and 2 deletions
|
|
@ -14,6 +14,6 @@ class AudioDocument(Document):
|
||||||
|
|
||||||
text = self.create_transcript()
|
text = self.create_transcript()
|
||||||
|
|
||||||
chunker = TextChunker(self, chunk_size = chunk_size, get_text = lambda: text)
|
chunker = TextChunker(self, chunk_size = chunk_size, get_text = lambda: [text])
|
||||||
|
|
||||||
yield from chunker.read()
|
yield from chunker.read()
|
||||||
|
|
|
||||||
|
|
@ -14,6 +14,6 @@ class ImageDocument(Document):
|
||||||
# Transcribe the image file
|
# Transcribe the image file
|
||||||
text = self.transcribe_image()
|
text = self.transcribe_image()
|
||||||
|
|
||||||
chunker = TextChunker(self, chunk_size = chunk_size, get_text = lambda: text)
|
chunker = TextChunker(self, chunk_size = chunk_size, get_text = lambda: [text])
|
||||||
|
|
||||||
yield from chunker.read()
|
yield from chunker.read()
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue