Fix lambda bug in AudioDocument and ImageDocument

This commit is contained in:
Leon Luithlen 2024-11-14 12:41:47 +01:00
parent 8b3b2f8156
commit f87fd12e9b
2 changed files with 2 additions and 2 deletions

View file

@ -14,6 +14,6 @@ class AudioDocument(Document):
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()

View file

@ -14,6 +14,6 @@ class ImageDocument(Document):
# Transcribe the image file
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()