Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -693,7 +693,6 @@ with gr.Blocks() as demo:
|
|
693 |
with gr.Column(scale=1):
|
694 |
audio_input = gr.Audio(sources="microphone", type="filepath", label="Speak your query")
|
695 |
transcribe_button = gr.Button("Transcribe")
|
696 |
-
transcription_status = gr.Textbox(label="Transcription Status")
|
697 |
|
698 |
with gr.Column(scale=2):
|
699 |
chatbot = gr.Chatbot(
|
@@ -728,12 +727,11 @@ with gr.Blocks() as demo:
|
|
728 |
update_output = gr.Textbox(label="Update Status")
|
729 |
delete_button = gr.Button("Delete Selected Documents")
|
730 |
|
731 |
-
# Update the
|
732 |
transcribe_button.click(
|
733 |
transcribe_async,
|
734 |
inputs=[audio_input],
|
735 |
-
outputs=[query_textbox
|
736 |
-
_js="startTranscription" # Add a JavaScript function to show a loading indicator
|
737 |
)
|
738 |
|
739 |
submit_button.click(
|
|
|
693 |
with gr.Column(scale=1):
|
694 |
audio_input = gr.Audio(sources="microphone", type="filepath", label="Speak your query")
|
695 |
transcribe_button = gr.Button("Transcribe")
|
|
|
696 |
|
697 |
with gr.Column(scale=2):
|
698 |
chatbot = gr.Chatbot(
|
|
|
727 |
update_output = gr.Textbox(label="Update Status")
|
728 |
delete_button = gr.Button("Delete Selected Documents")
|
729 |
|
730 |
+
# Update the Gradio interface to use the async function
|
731 |
transcribe_button.click(
|
732 |
transcribe_async,
|
733 |
inputs=[audio_input],
|
734 |
+
outputs=[query_textbox]
|
|
|
735 |
)
|
736 |
|
737 |
submit_button.click(
|