Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -16,10 +16,7 @@ provide it and then gently inquire if they want to talk about it. If you don't k
|
|
16 |
"Hmm, I'm not sure." Don't try to make up an answer. If the question is not about mental health or resources,
|
17 |
politely inform them that you are tuned to only answer questions about mental health and well being."""
|
18 |
|
19 |
-
|
20 |
-
bot_message = ["How are you?"]
|
21 |
-
chat_history.append((message, bot_message))
|
22 |
-
return "", chat_history
|
23 |
|
24 |
# Execute the chat functionality.
|
25 |
# output = chain({"message": inp, "chat_history": history})["response"]
|
@@ -50,8 +47,12 @@ with gr.Blocks(theme=gr.themes.Soft()) as demo:
|
|
50 |
inputs=message,
|
51 |
)
|
52 |
"""
|
|
|
|
|
|
|
|
|
53 |
|
54 |
-
message.
|
55 |
|
56 |
clear.click(lambda: None, None, chatbot, queue=False)
|
57 |
|
|
|
16 |
"Hmm, I'm not sure." Don't try to make up an answer. If the question is not about mental health or resources,
|
17 |
politely inform them that you are tuned to only answer questions about mental health and well being."""
|
18 |
|
19 |
+
|
|
|
|
|
|
|
20 |
|
21 |
# Execute the chat functionality.
|
22 |
# output = chain({"message": inp, "chat_history": history})["response"]
|
|
|
47 |
inputs=message,
|
48 |
)
|
49 |
"""
|
50 |
+
def respond(message, chat_history):
|
51 |
+
bot_message = ["How are you?"]
|
52 |
+
chat_history.append((message, bot_message))
|
53 |
+
return "", chat_history
|
54 |
|
55 |
+
message.click(respond, [message, chatbot])
|
56 |
|
57 |
clear.click(lambda: None, None, chatbot, queue=False)
|
58 |
|