Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -34,9 +34,9 @@ def pdf_to_document_store(pdf_files):
|
|
| 34 |
|
| 35 |
def summarize(files):
|
| 36 |
pdf_to_document_store(files)
|
| 37 |
-
|
| 38 |
st.write('Summary')
|
| 39 |
-
st.write(
|
| 40 |
|
| 41 |
document_store, summarizer, preprocessor = start_haystack()
|
| 42 |
|
|
|
|
| 34 |
|
| 35 |
def summarize(files):
|
| 36 |
pdf_to_document_store(files)
|
| 37 |
+
summaries = summarizer.predict(documents=document_store.get_all_documents(), generate_single_summary=True)
|
| 38 |
st.write('Summary')
|
| 39 |
+
st.write(summaries[0]['content'])
|
| 40 |
|
| 41 |
document_store, summarizer, preprocessor = start_haystack()
|
| 42 |
|