Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
@@ -27,14 +27,14 @@ def pdf_to_document_store(pdf_files):
|
|
27 |
|
28 |
|
29 |
def summarize(files):
|
|
|
30 |
if files is not None:
|
31 |
-
document_store.delete_all_documents()
|
32 |
pdf_to_document_store(files)
|
33 |
return document_store.get_document_count()
|
34 |
|
35 |
title = "Summarize one or more PDFs with a Haystack Summariser pipeline"
|
36 |
iface = gr.Interface(fn=summarize,
|
37 |
-
inputs=gr.inputs.File(file_count="
|
38 |
outputs="text",
|
39 |
title=title,
|
40 |
theme="default")
|
|
|
27 |
|
28 |
|
29 |
def summarize(files):
|
30 |
+
logging.info(files)
|
31 |
if files is not None:
|
|
|
32 |
pdf_to_document_store(files)
|
33 |
return document_store.get_document_count()
|
34 |
|
35 |
title = "Summarize one or more PDFs with a Haystack Summariser pipeline"
|
36 |
iface = gr.Interface(fn=summarize,
|
37 |
+
inputs=gr.inputs.File(file_count="single", type="file", label="Upload some PDFs"),
|
38 |
outputs="text",
|
39 |
title=title,
|
40 |
theme="default")
|