Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -31,13 +31,12 @@ def pdf_to_document_store(pdf_files):
|
|
| 31 |
preprocessed_docs=preprocessor.process([doc])
|
| 32 |
document_store.write_documents(preprocessed_docs)
|
| 33 |
temp_file.close()
|
| 34 |
-
st.write('Document count: ', document_store.get_document_count())
|
| 35 |
-
|
| 36 |
|
| 37 |
def summarize(files):
|
| 38 |
pdf_to_document_store(files)
|
| 39 |
summary = summarizer.predict(documents=document_store.get_all_documents(), generate_single_summary=True)
|
| 40 |
-
st.write(
|
|
|
|
| 41 |
|
| 42 |
document_store, summarizer, preprocessor = start_haystack()
|
| 43 |
|
|
|
|
| 31 |
preprocessed_docs=preprocessor.process([doc])
|
| 32 |
document_store.write_documents(preprocessed_docs)
|
| 33 |
temp_file.close()
|
|
|
|
|
|
|
| 34 |
|
| 35 |
def summarize(files):
|
| 36 |
pdf_to_document_store(files)
|
| 37 |
summary = summarizer.predict(documents=document_store.get_all_documents(), generate_single_summary=True)
|
| 38 |
+
st.write('Summary')
|
| 39 |
+
st.write(summary['content'])
|
| 40 |
|
| 41 |
document_store, summarizer, preprocessor = start_haystack()
|
| 42 |
|