Update app.py
Browse files
app.py
CHANGED
@@ -93,7 +93,10 @@ tokenizer = AutoTokenizer.from_pretrained(llm_model)
|
|
93 |
#question = "How can I reverse diabetes?"
|
94 |
|
95 |
#pipe = pipeline(model = llm_model, tokenizer = tokenizer, task = "text-generation", temperature=0.2)
|
96 |
-
|
|
|
|
|
|
|
97 |
print("check2")
|
98 |
qa = ConversationalRetrievalChain.from_llm(
|
99 |
pipe,
|
|
|
93 |
#question = "How can I reverse diabetes?"
|
94 |
|
95 |
#pipe = pipeline(model = llm_model, tokenizer = tokenizer, task = "text-generation", temperature=0.2)
|
96 |
+
|
97 |
+
from langchain.chains.question_answering import load_qa_chain
|
98 |
+
|
99 |
+
pipe = load_qa_chain(llm=llm_model,tokenizer =tokenizer, chain_type="map_reduce")
|
100 |
print("check2")
|
101 |
qa = ConversationalRetrievalChain.from_llm(
|
102 |
pipe,
|