KarthickAdopleAI commited on
Commit
952e994
1 Parent(s): 61c8fd7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -271,9 +271,11 @@ class LangChain_Document_QA:
271
  plot_3 =gr.Plot(label="Patient_Emotion", size=(500, 600))
272
 
273
 
274
- txt_msg = txt.submit(self._add_text, [chatbot, txt], [chatbot, txt])
 
 
275
  txt_msg.then(lambda: gr.update(interactive=True), None, [txt])
276
- txt.submit(self._suggested_answer, [chatbot,txt],chatbot)
277
  button.click(self._agent_text, [chatbot,txt3], chatbot)
278
  end_btn.click(self._display_history, [], txt4)
279
  emptyBtn.click(self.clear_func,[],[])
 
271
  plot_3 =gr.Plot(label="Patient_Emotion", size=(500, 600))
272
 
273
 
274
+ txt_msg = txt.submit(self._add_text, [chatbot, txt], [chatbot, txt]).then(
275
+ self._suggested_answer, [chatbot,txt],chatbot
276
+ )
277
  txt_msg.then(lambda: gr.update(interactive=True), None, [txt])
278
+ # txt.submit(self._suggested_answer, [chatbot,txt],chatbot)
279
  button.click(self._agent_text, [chatbot,txt3], chatbot)
280
  end_btn.click(self._display_history, [], txt4)
281
  emptyBtn.click(self.clear_func,[],[])