Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -27,25 +27,21 @@ def respond(message, chat_history):
|
|
27 |
# return history
|
28 |
|
29 |
with gr.Blocks(theme=gr.themes.Soft()) as demo:
|
30 |
-
|
31 |
gr.HTML("<center><h2>Omdena AI Chatbot For Mental Health and Well Being</h2></center>")
|
32 |
|
33 |
gr.HTML("WELCOME<br>"
|
34 |
"I am an AI ChatBot and I am here to assist you with whatever is bothering you. "
|
35 |
"Our conversation is strictly confidential and I will not remember it when you come back another time."
|
36 |
)
|
37 |
-
|
38 |
-
|
39 |
-
message = gr.Textbox(
|
40 |
-
label="What would you like to chat about?",
|
41 |
-
type = "text",
|
42 |
-
)
|
43 |
|
44 |
with gr.Row():
|
45 |
submit = gr.Button(value="Send")
|
46 |
clear = gr.Button(value="Clear Chat")
|
47 |
|
48 |
-
gr.Examples(
|
49 |
examples=[
|
50 |
"I feel lonely",
|
51 |
"I'm having problems at home",
|
@@ -53,9 +49,10 @@ with gr.Blocks(theme=gr.themes.Soft()) as demo:
|
|
53 |
],
|
54 |
inputs=message,
|
55 |
)
|
|
|
56 |
|
57 |
-
chatbot = gr.Chatbot()
|
58 |
message.submit(respond, [message, chatbot])
|
|
|
59 |
clear.click(lambda: None, None, chatbot, queue=False)
|
60 |
|
61 |
if __name__ == "__main__":
|
|
|
27 |
# return history
|
28 |
|
29 |
with gr.Blocks(theme=gr.themes.Soft()) as demo:
|
30 |
+
|
31 |
gr.HTML("<center><h2>Omdena AI Chatbot For Mental Health and Well Being</h2></center>")
|
32 |
|
33 |
gr.HTML("WELCOME<br>"
|
34 |
"I am an AI ChatBot and I am here to assist you with whatever is bothering you. "
|
35 |
"Our conversation is strictly confidential and I will not remember it when you come back another time."
|
36 |
)
|
37 |
+
chatbot = gr.Chatbot()
|
38 |
+
message = gr.Textbox(label="What would you like to chat about?")
|
|
|
|
|
|
|
|
|
39 |
|
40 |
with gr.Row():
|
41 |
submit = gr.Button(value="Send")
|
42 |
clear = gr.Button(value="Clear Chat")
|
43 |
|
44 |
+
""" gr.Examples(
|
45 |
examples=[
|
46 |
"I feel lonely",
|
47 |
"I'm having problems at home",
|
|
|
49 |
],
|
50 |
inputs=message,
|
51 |
)
|
52 |
+
"""
|
53 |
|
|
|
54 |
message.submit(respond, [message, chatbot])
|
55 |
+
|
56 |
clear.click(lambda: None, None, chatbot, queue=False)
|
57 |
|
58 |
if __name__ == "__main__":
|