Spaces:
Build error
Build error
update
Browse files
app.py
CHANGED
@@ -20,8 +20,10 @@ def pdf_to_document_store(pdf_files):
|
|
20 |
converter = PDFToTextConverter(remove_numeric_tables=True, valid_languages=["en"])
|
21 |
documents = []
|
22 |
for pdf in pdf_files:
|
|
|
23 |
doc = converter.convert(file_path=pdf.name, meta=None)[0]
|
24 |
documents.append(doc)
|
|
|
25 |
preprocessed_docs = preprocessor.process(documents)
|
26 |
document_store.write_documents(preprocessed_docs)
|
27 |
return None
|
|
|
20 |
converter = PDFToTextConverter(remove_numeric_tables=True, valid_languages=["en"])
|
21 |
documents = []
|
22 |
for pdf in pdf_files:
|
23 |
+
st.write(pdf.name)
|
24 |
doc = converter.convert(file_path=pdf.name, meta=None)[0]
|
25 |
documents.append(doc)
|
26 |
+
st.write(len(documents))
|
27 |
preprocessed_docs = preprocessor.process(documents)
|
28 |
document_store.write_documents(preprocessed_docs)
|
29 |
return None
|