Update app2.py
Browse files
app2.py
CHANGED
|
@@ -51,7 +51,7 @@ db=build_model(documents,chunk_size,chunk_overlap)
|
|
| 51 |
|
| 52 |
##################################################################################################
|
| 53 |
def load_model(query,db):
|
| 54 |
-
llm=HuggingFaceHub(repo_id="
|
| 55 |
chain = load_qa_chain(llm, chain_type="stuff")
|
| 56 |
docs = db.similarity_search(query)
|
| 57 |
out=chain.run(input_documents=docs, question=query)
|
|
|
|
| 51 |
|
| 52 |
##################################################################################################
|
| 53 |
def load_model(query,db):
|
| 54 |
+
llm=HuggingFaceHub(repo_id="sentence-transformers/all-MiniLM-L6-v2", model_kwargs={"temperature":0.1, "max_length":400})
|
| 55 |
chain = load_qa_chain(llm, chain_type="stuff")
|
| 56 |
docs = db.similarity_search(query)
|
| 57 |
out=chain.run(input_documents=docs, question=query)
|