Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -66,8 +66,8 @@ def main():
|
|
| 66 |
#llm = AutoModelForCausalLM.from_pretrained("CohereForAI/aya-101")
|
| 67 |
# llm = AutoModelForCausalLM.from_pretrained(PATH,local_files_only=True)
|
| 68 |
llm = huggingface_hub.HuggingFaceHub(repo_id="google/flan-t5-small",
|
| 69 |
-
model_kwargs={"temperature":1.0, "max_length":
|
| 70 |
-
docs = vector_store.similarity_search(query=query, k=
|
| 71 |
st.write(docs)
|
| 72 |
chain = load_qa_chain(llm=llm, chain_type="stuff")
|
| 73 |
response = chain.run(input_documents=docs, question=query)
|
|
|
|
| 66 |
#llm = AutoModelForCausalLM.from_pretrained("CohereForAI/aya-101")
|
| 67 |
# llm = AutoModelForCausalLM.from_pretrained(PATH,local_files_only=True)
|
| 68 |
llm = huggingface_hub.HuggingFaceHub(repo_id="google/flan-t5-small",
|
| 69 |
+
model_kwargs={"temperature":1.0, "max_length":500})
|
| 70 |
+
docs = vector_store.similarity_search(query=query, k=3)
|
| 71 |
st.write(docs)
|
| 72 |
chain = load_qa_chain(llm=llm, chain_type="stuff")
|
| 73 |
response = chain.run(input_documents=docs, question=query)
|