jerrypan7 commited on
Commit
3975d95
Β·
verified Β·
1 Parent(s): eb94645

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -2
app.py CHANGED
@@ -80,8 +80,11 @@ def download_youtube_audio(youtube_url: str, output_dir: Optional[str] = None) -
80
  print("Error:", response.status_code, response.text)
81
  return None # Return None on failure
82
 
83
- def run_asr(audio_file, youtube_url, with_timestamp, model_choice):
84
  temp_file = None
 
 
 
85
  try:
86
  if youtube_url:
87
  # It's a YouTube URL
@@ -147,7 +150,7 @@ with gr.Blocks(theme=gr.themes.Soft()) as demo:
147
  )
148
 
149
  run_button = gr.Button("πŸš€ Transcribe Audio", variant="primary", interactive=False)
150
- run_button.click(run_asr, inputs=[audio_input, youtube_input, False, 'local_whisper'], outputs=[result])
151
 
152
  # Update video player, clear transcription and audio input, and enable run button when YouTube URL is entered
153
  youtube_input.change(
 
80
  print("Error:", response.status_code, response.text)
81
  return None # Return None on failure
82
 
83
+ def run_asr(audio_file, youtube_url):
84
  temp_file = None
85
+ with_timestamp=False
86
+ model_choice = "local_whisper"
87
+
88
  try:
89
  if youtube_url:
90
  # It's a YouTube URL
 
150
  )
151
 
152
  run_button = gr.Button("πŸš€ Transcribe Audio", variant="primary", interactive=False)
153
+ run_button.click(run_asr, inputs=[audio_input, youtube_input], outputs=[result])
154
 
155
  # Update video player, clear transcription and audio input, and enable run button when YouTube URL is entered
156
  youtube_input.change(