Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -287,7 +287,7 @@ with gr.Blocks(theme="rawrsor1/Everforest") as demo:
|
|
287 |
|
288 |
# Define interactions for the Get Response button
|
289 |
get_response_btn.click(
|
290 |
-
fn=
|
291 |
inputs=[mode_selection, chatbot, question_input],
|
292 |
outputs=[chatbot, question_input, audio_output],
|
293 |
api_name="api_add_message_on_button_click"
|
@@ -297,7 +297,7 @@ with gr.Blocks(theme="rawrsor1/Everforest") as demo:
|
|
297 |
|
298 |
|
299 |
question_input.submit(
|
300 |
-
fn=
|
301 |
inputs=[mode_selection, chatbot, question_input],
|
302 |
outputs=[chatbot, question_input, audio_output],
|
303 |
api_name="api_add_message_on_enter"
|
@@ -305,7 +305,7 @@ with gr.Blocks(theme="rawrsor1/Everforest") as demo:
|
|
305 |
|
306 |
|
307 |
submit_voice_btn.click(
|
308 |
-
fn=
|
309 |
inputs=[mode_selection, chatbot, question_input],
|
310 |
outputs=[chatbot, question_input, audio_output],
|
311 |
api_name="api_voice_to_voice_translation"
|
|
|
287 |
|
288 |
# Define interactions for the Get Response button
|
289 |
get_response_btn.click(
|
290 |
+
fn=async_handle_mode_selection,
|
291 |
inputs=[mode_selection, chatbot, question_input],
|
292 |
outputs=[chatbot, question_input, audio_output],
|
293 |
api_name="api_add_message_on_button_click"
|
|
|
297 |
|
298 |
|
299 |
question_input.submit(
|
300 |
+
fn=async_handle_mode_selection,
|
301 |
inputs=[mode_selection, chatbot, question_input],
|
302 |
outputs=[chatbot, question_input, audio_output],
|
303 |
api_name="api_add_message_on_enter"
|
|
|
305 |
|
306 |
|
307 |
submit_voice_btn.click(
|
308 |
+
fn=async_handle_mode_selection,
|
309 |
inputs=[mode_selection, chatbot, question_input],
|
310 |
outputs=[chatbot, question_input, audio_output],
|
311 |
api_name="api_voice_to_voice_translation"
|