Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
@@ -14,7 +14,7 @@ def start_haystack():
|
|
14 |
split_by="word",
|
15 |
split_length=100,
|
16 |
split_respect_sentence_boundary=True,
|
17 |
-
split_overlap=
|
18 |
)
|
19 |
summarizer = TransformersSummarizer(model_name_or_path="google/pegasus-xsum")
|
20 |
return document_store, summarizer, preprocessor
|
@@ -29,6 +29,7 @@ def pdf_to_document_store(pdf_files):
|
|
29 |
documents.append(doc)
|
30 |
st.write(len(documents))
|
31 |
preprocessed_docs = preprocessor.process(documents)
|
|
|
32 |
document_store.write_documents(preprocessed_docs)
|
33 |
st.write('Document count: ', document_store.get_document_count())
|
34 |
|
|
|
14 |
split_by="word",
|
15 |
split_length=100,
|
16 |
split_respect_sentence_boundary=True,
|
17 |
+
split_overlap=0
|
18 |
)
|
19 |
summarizer = TransformersSummarizer(model_name_or_path="google/pegasus-xsum")
|
20 |
return document_store, summarizer, preprocessor
|
|
|
29 |
documents.append(doc)
|
30 |
st.write(len(documents))
|
31 |
preprocessed_docs = preprocessor.process(documents)
|
32 |
+
st.write('Preprocessed count: ', len(preprocessed_docs))
|
33 |
document_store.write_documents(preprocessed_docs)
|
34 |
st.write('Document count: ', document_store.get_document_count())
|
35 |
|