Update app.py
Browse files
app.py
CHANGED
@@ -145,6 +145,7 @@ with gr.Blocks(css=css) as demo:
|
|
145 |
|
146 |
chatbot = gr.Chatbot()
|
147 |
msg = gr.Textbox()
|
|
|
148 |
clear = gr.Button("Clear")
|
149 |
state = gr.State("initial_assessment")
|
150 |
severity = gr.State("low")
|
@@ -164,6 +165,9 @@ with gr.Blocks(css=css) as demo:
|
|
164 |
msg.submit(user, [msg, chatbot, state, severity], [msg, chatbot, state, severity], queue=False).then(
|
165 |
bot, [chatbot, state, severity], [chatbot, state, severity, audio_output]
|
166 |
)
|
|
|
|
|
|
|
167 |
clear.click(lambda: ([], "initial_assessment", "low", None), None, [chatbot, state, severity, audio_output], queue=False)
|
168 |
|
169 |
gr.Examples(
|
|
|
145 |
|
146 |
chatbot = gr.Chatbot()
|
147 |
msg = gr.Textbox()
|
148 |
+
submit_button = gr.Button("Submit")
|
149 |
clear = gr.Button("Clear")
|
150 |
state = gr.State("initial_assessment")
|
151 |
severity = gr.State("low")
|
|
|
165 |
msg.submit(user, [msg, chatbot, state, severity], [msg, chatbot, state, severity], queue=False).then(
|
166 |
bot, [chatbot, state, severity], [chatbot, state, severity, audio_output]
|
167 |
)
|
168 |
+
submit_button.click(user, [msg, chatbot, state, severity], [msg, chatbot, state, severity], queue=False).then(
|
169 |
+
bot, [chatbot, state, severity], [chatbot, state, severity, audio_output]
|
170 |
+
)
|
171 |
clear.click(lambda: ([], "initial_assessment", "low", None), None, [chatbot, state, severity, audio_output], queue=False)
|
172 |
|
173 |
gr.Examples(
|