shijunju commited on
Commit
b7ffb14
·
verified ·
1 Parent(s): 188b89f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -4
app.py CHANGED
@@ -50,15 +50,16 @@ with gr.Blocks() as demo:
50
  status_message = gr.Textbox(label="Status", interactive=False)
51
 
52
  def update_output(filepath):
53
- status_message.update(value="Downloading model (2-3mins)...")
 
54
  transcribed_text, text_file_path = transcribe_speech(filepath)
55
- status_message.update(value="Transcription completed")
56
- return transcribed_text, text_file_path
57
 
58
  transcribe_button.click(
59
  fn=update_output,
60
  inputs=audio_input,
61
- outputs=[output_textbox, download_link, status_message]
62
  )
63
 
64
  # Launch the Gradio app
 
50
  status_message = gr.Textbox(label="Status", interactive=False)
51
 
52
  def update_output(filepath):
53
+ yield "Downloading model (2-3mins)...", "", None
54
+
55
  transcribed_text, text_file_path = transcribe_speech(filepath)
56
+
57
+ yield "Transcription completed", transcribed_text, text_file_path
58
 
59
  transcribe_button.click(
60
  fn=update_output,
61
  inputs=audio_input,
62
+ outputs=[status_message, output_textbox, download_link]
63
  )
64
 
65
  # Launch the Gradio app