Tuana commited on
Commit
5daf335
1 Parent(s): cd8e155

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -25,8 +25,9 @@ def pdf_to_document_store(pdf_files):
25
  for pdf in pdf_files:
26
  doc = converter.convert(file_path=pdf.name, meta=None)[0]
27
  preprocessed_doc=preprocessor.process([doc])
28
- documents.append(doc)
29
- document_store.write_documents(preprocessed_doc)
 
30
  st.write('Document count: ', document_store.get_document_count())
31
 
32
 
 
25
  for pdf in pdf_files:
26
  doc = converter.convert(file_path=pdf.name, meta=None)[0]
27
  preprocessed_doc=preprocessor.process([doc])
28
+ st.write(preprocessed_doc[0]['content']
29
+ documents.append(preprocessed_doc)
30
+ document_store.write_documents(documents)
31
  st.write('Document count: ', document_store.get_document_count())
32
 
33