Spaces:
Runtime error
Runtime error
Karthikeyan
commited on
Commit
•
3a6ec48
1
Parent(s):
4cb1de5
Update app.py
Browse files
app.py
CHANGED
@@ -224,7 +224,7 @@ class LangChain_Document_QA:
|
|
224 |
with gr.Row():
|
225 |
gr.HTML("""<center><h1>AI Mental Healthcare ChatBot</h1></center>""")
|
226 |
with gr.Row():
|
227 |
-
with gr.Column(scale=
|
228 |
with gr.Row():
|
229 |
chatbot = gr.Chatbot([], elem_id="chatbot").style(height=360)
|
230 |
with gr.Row():
|
@@ -232,14 +232,14 @@ class LangChain_Document_QA:
|
|
232 |
txt = gr.Textbox(show_label=False,placeholder="Patient").style(container=False)
|
233 |
with gr.Column(scale=0.10):
|
234 |
emptyBtn = gr.Button("🧹 Clear")
|
235 |
-
with gr.Column(scale=0.30):
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
|
244 |
# with gr.Row():
|
245 |
# with gr.Column(scale=0.80):
|
@@ -274,8 +274,8 @@ class LangChain_Document_QA:
|
|
274 |
|
275 |
txt_msg = txt.submit(self._add_text, [chatbot, txt], [chatbot, txt])
|
276 |
txt_msg.then(lambda: gr.update(interactive=True), None, [txt])
|
277 |
-
txt.submit(self._suggested_answer,txt,
|
278 |
-
button.click(self._agent_text, [chatbot,txt3], chatbot)
|
279 |
end_btn.click(self._display_history, [], txt4)
|
280 |
emptyBtn.click(self.clear_func,[],[])
|
281 |
emptyBtn.click(lambda: None, None, chatbot, queue=False)
|
|
|
224 |
with gr.Row():
|
225 |
gr.HTML("""<center><h1>AI Mental Healthcare ChatBot</h1></center>""")
|
226 |
with gr.Row():
|
227 |
+
with gr.Column(scale=1):
|
228 |
with gr.Row():
|
229 |
chatbot = gr.Chatbot([], elem_id="chatbot").style(height=360)
|
230 |
with gr.Row():
|
|
|
232 |
txt = gr.Textbox(show_label=False,placeholder="Patient").style(container=False)
|
233 |
with gr.Column(scale=0.10):
|
234 |
emptyBtn = gr.Button("🧹 Clear")
|
235 |
+
# with gr.Column(scale=0.30):
|
236 |
+
# with gr.Row():
|
237 |
+
# txt3 =gr.Textbox(
|
238 |
+
# show_label=False,
|
239 |
+
# placeholder="AI Healthcare Suggesstion",
|
240 |
+
# elem_id="suggestheight").style(container=False)
|
241 |
+
# with gr.Row():
|
242 |
+
# button=gr.Button(value="🚀send")
|
243 |
|
244 |
# with gr.Row():
|
245 |
# with gr.Column(scale=0.80):
|
|
|
274 |
|
275 |
txt_msg = txt.submit(self._add_text, [chatbot, txt], [chatbot, txt])
|
276 |
txt_msg.then(lambda: gr.update(interactive=True), None, [txt])
|
277 |
+
txt.submit(self._suggested_answer,txt,chatbot)
|
278 |
+
#button.click(self._agent_text, [chatbot,txt3], chatbot)
|
279 |
end_btn.click(self._display_history, [], txt4)
|
280 |
emptyBtn.click(self.clear_func,[],[])
|
281 |
emptyBtn.click(lambda: None, None, chatbot, queue=False)
|