Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -665,13 +665,12 @@ def transcribe_and_respond(audio_file, history, model, temperature, num_calls, u
|
|
665 |
logging.info(f"Query extracted from transcription: {query}")
|
666 |
|
667 |
# Use the transcription as the query
|
668 |
-
|
669 |
|
670 |
-
logging.info(f"
|
671 |
|
672 |
-
#
|
673 |
-
|
674 |
-
new_history[-1] = (query, new_history[-1][1])
|
675 |
|
676 |
return new_history
|
677 |
|
@@ -772,7 +771,7 @@ with gr.Blocks() as demo:
|
|
772 |
transcribe_button.click(
|
773 |
transcribe_and_respond,
|
774 |
inputs=[audio_input, chatbot, model, temperature, num_calls, use_web_search, document_selector],
|
775 |
-
outputs=
|
776 |
)
|
777 |
|
778 |
submit_button.click(
|
|
|
665 |
logging.info(f"Query extracted from transcription: {query}")
|
666 |
|
667 |
# Use the transcription as the query
|
668 |
+
response = next(respond(query, history, model, temperature, num_calls, use_web_search, document_selector))
|
669 |
|
670 |
+
logging.info(f"Response: {response}")
|
671 |
|
672 |
+
# Update the history with the new query and response
|
673 |
+
new_history = history + [(query, response)]
|
|
|
674 |
|
675 |
return new_history
|
676 |
|
|
|
771 |
transcribe_button.click(
|
772 |
transcribe_and_respond,
|
773 |
inputs=[audio_input, chatbot, model, temperature, num_calls, use_web_search, document_selector],
|
774 |
+
outputs=chatbot
|
775 |
)
|
776 |
|
777 |
submit_button.click(
|