Namitg02 commited on
Commit
499f9a2
·
verified ·
1 Parent(s): 48a5b37

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -82,7 +82,7 @@ qa_chat_prompt = ChatPromptTemplate.from_messages(
82
  "You are a Diabetes eductaor that provide advice to patients."
83
  )
84
  ),
85
- HumanMessagePromptTemplate.from_template("{input}"),
86
  ]
87
  )
88
 
@@ -90,7 +90,7 @@ docs_chain = create_stuff_documents_chain(
90
  "READER_MODEL", qa_chat_prompt
91
  )
92
  retrieval_chain = create_retrieval_chain(retriever, docs_chain)
93
- response = retrieval_chain.invoke({"input": "how can I reverse diabetes?"})
94
  print(response["answer"])
95
 
96
 
 
82
  "You are a Diabetes eductaor that provide advice to patients."
83
  )
84
  ),
85
+ HumanMessagePromptTemplate.from_template("{context}"),
86
  ]
87
  )
88
 
 
90
  "READER_MODEL", qa_chat_prompt
91
  )
92
  retrieval_chain = create_retrieval_chain(retriever, docs_chain)
93
+ response = retrieval_chain.invoke({"context": "how can I reverse diabetes?"})
94
  print(response["answer"])
95
 
96