Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -372,22 +372,22 @@ with gr.Blocks(theme="rawrsor1/Everforest") as demo:
|
|
372 |
fn=handle_mode_selection,
|
373 |
inputs=[mode_selection, chatbot, question_input],
|
374 |
outputs=[chatbot, question_input, audio_output],
|
375 |
-
api_name="
|
376 |
-
)
|
377 |
|
378 |
question_input.submit(
|
379 |
fn=handle_mode_selection,
|
380 |
inputs=[mode_selection, chatbot, question_input],
|
381 |
outputs=[chatbot, question_input, audio_output],
|
382 |
-
api_name="
|
383 |
-
)
|
384 |
|
385 |
|
386 |
submit_voice_btn.click(
|
387 |
fn=handle_mode_selection,
|
388 |
inputs=[mode_selection, chatbot, question_input],
|
389 |
outputs=[chatbot, question_input, audio_output],
|
390 |
-
api_name="
|
391 |
)
|
392 |
|
393 |
# Speech-to-Text functionality
|
|
|
372 |
fn=handle_mode_selection,
|
373 |
inputs=[mode_selection, chatbot, question_input],
|
374 |
outputs=[chatbot, question_input, audio_output],
|
375 |
+
api_name="api_add_message_on_button_click"
|
376 |
+
).then(fn=chat_with_bot, inputs=[chatbot], outputs=chatbot,api_name="api_ask_retriever_on_button_click")
|
377 |
|
378 |
question_input.submit(
|
379 |
fn=handle_mode_selection,
|
380 |
inputs=[mode_selection, chatbot, question_input],
|
381 |
outputs=[chatbot, question_input, audio_output],
|
382 |
+
api_name="api_add_message_on_enter"
|
383 |
+
).then(fn=chat_with_bot, inputs=[chatbot], outputs=chatbot,api_name="api_ask_retriever_on_enter")
|
384 |
|
385 |
|
386 |
submit_voice_btn.click(
|
387 |
fn=handle_mode_selection,
|
388 |
inputs=[mode_selection, chatbot, question_input],
|
389 |
outputs=[chatbot, question_input, audio_output],
|
390 |
+
api_name="api_voice_to_voice_translation"
|
391 |
)
|
392 |
|
393 |
# Speech-to-Text functionality
|