Pijush2023 commited on
Commit
4f78c42
·
verified ·
1 Parent(s): de0f6aa

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
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=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,7 +297,7 @@ with gr.Blocks(theme="rawrsor1/Everforest") as demo:
297
 
298
 
299
  question_input.submit(
300
- fn=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,7 +305,7 @@ with gr.Blocks(theme="rawrsor1/Everforest") as demo:
305
 
306
 
307
  submit_voice_btn.click(
308
- fn=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"
 
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"