Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -69,9 +69,9 @@ def main():
|
|
69 |
llm = huggingface_hub.HuggingFaceHub(repo_id="google/flan-t5-small",
|
70 |
model_kwargs={"temperature":1.0, "max_length":256})
|
71 |
if query == 'Summarize':
|
72 |
-
docs = pdf_reader.load_and_split()
|
73 |
chain = load_summarize_chain(llm, chain_type="map_reduce")
|
74 |
-
response = chain.run(
|
75 |
else:
|
76 |
docs = vector_store.similarity_search(query=query, k=2)
|
77 |
#st.write(docs)
|
|
|
69 |
llm = huggingface_hub.HuggingFaceHub(repo_id="google/flan-t5-small",
|
70 |
model_kwargs={"temperature":1.0, "max_length":256})
|
71 |
if query == 'Summarize':
|
72 |
+
#docs = pdf_reader.load_and_split()
|
73 |
chain = load_summarize_chain(llm, chain_type="map_reduce")
|
74 |
+
response = chain.run(text)
|
75 |
else:
|
76 |
docs = vector_store.similarity_search(query=query, k=2)
|
77 |
#st.write(docs)
|