Spaces:
Runtime error
Runtime error
text_splitter.split_documents
Browse files
app.py
CHANGED
|
@@ -70,7 +70,8 @@ def process_text_file(file: AskFileResponse):
|
|
| 70 |
documents = pdf_loader.load()
|
| 71 |
else:
|
| 72 |
raise ValueError("Provide a .txt or .pdf file")
|
| 73 |
-
texts = [x.page_content for x in text_splitter.transform_documents(documents)]
|
|
|
|
| 74 |
return texts
|
| 75 |
|
| 76 |
|
|
|
|
| 70 |
documents = pdf_loader.load()
|
| 71 |
else:
|
| 72 |
raise ValueError("Provide a .txt or .pdf file")
|
| 73 |
+
# texts = [x.page_content for x in text_splitter.transform_documents(documents)]
|
| 74 |
+
texts = [x.page_content for x in text_splitter.split_documents(documents)]
|
| 75 |
return texts
|
| 76 |
|
| 77 |
|