Namitg02 commited on
Commit
aff4a30
·
verified ·
1 Parent(s): f120119

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -97,9 +97,11 @@ llm = HuggingFaceLLM(
97
  model_name="microsoft/Phi-3-mini-4k-instruct",
98
  )
99
 
100
- #question = "How can I reverse diabetes?"
101
 
102
  #pipe = pipeline(model = llm_model, tokenizer = tokenizer, task = "text-generation", temperature=0.2)
 
 
103
 
104
  from langchain.chains.question_answering import load_qa_chain
105
 
@@ -112,7 +114,7 @@ qa = ConversationalRetrievalChain.from_llm(
112
  chain_type_kwargs={"prompt": QA_CHAIN_PROMPT}
113
  )
114
 
115
- question = "How can I reverse diabetes?"
116
  result = qa({"question": question})
117
  print("result")
118
  #result['answer']
 
97
  model_name="microsoft/Phi-3-mini-4k-instruct",
98
  )
99
 
100
+ question = "How can I reverse diabetes?"
101
 
102
  #pipe = pipeline(model = llm_model, tokenizer = tokenizer, task = "text-generation", temperature=0.2)
103
+ docs1 = retriever.get_relevant_documents(question)
104
+ print("docs1")
105
 
106
  from langchain.chains.question_answering import load_qa_chain
107
 
 
114
  chain_type_kwargs={"prompt": QA_CHAIN_PROMPT}
115
  )
116
 
117
+ #question = "How can I reverse diabetes?"
118
  result = qa({"question": question})
119
  print("result")
120
  #result['answer']