Ritesh-hf commited on
Commit
b66dbaf
·
verified ·
1 Parent(s): 45a4204

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -152,7 +152,7 @@ examples = [
152
  ["arabic_english_audios/audios/english_audio_49.mp3", 'English', 'transcribe', 'word'],
153
  ]
154
 
155
- with gr.Blocks(theme=gr.themes.Default()) as demo:
156
  gr.HTML("<h2 style='text-align: center;'>Transcribing Audio with Timestamps using whisper-large-v3</h2>")
157
  # gr.Markdown("")
158
  with gr.Row():
@@ -171,11 +171,11 @@ with gr.Blocks(theme=gr.themes.Default()) as demo:
171
  foul_words = gr.Text(label="Foul Words")
172
  output_audio = gr.Audio(label="Output Audio", type="numpy")
173
 
174
- examples = gr.Examples(examples, inputs=[audio_input, audio_language, task, timestamp_type], outputs=[transcript_output, timestamp_output, foul_words, output_audio], fn=transcribe, examples_per_page=20, cache_examples=False)
175
 
176
  submit_button.click(fn=transcribe, inputs=[audio_input, audio_language, task, timestamp_type], outputs=[transcript_output, timestamp_output, foul_words, output_audio])
177
  clear_button.add([audio_input, audio_language, task, timestamp_type, transcript_output, timestamp_output, foul_words, output_audio])
178
 
179
 
180
  if __name__ == "__main__":
181
- demo.launch(cache_examples=False)
 
152
  ["arabic_english_audios/audios/english_audio_49.mp3", 'English', 'transcribe', 'word'],
153
  ]
154
 
155
+ with gr.Blocks(theme=gr.themes.Default(), cache_examples=False) as demo:
156
  gr.HTML("<h2 style='text-align: center;'>Transcribing Audio with Timestamps using whisper-large-v3</h2>")
157
  # gr.Markdown("")
158
  with gr.Row():
 
171
  foul_words = gr.Text(label="Foul Words")
172
  output_audio = gr.Audio(label="Output Audio", type="numpy")
173
 
174
+ examples = gr.Examples(examples, inputs=[audio_input, audio_language, task, timestamp_type], outputs=[transcript_output, timestamp_output, foul_words, output_audio], fn=transcribe, examples_per_page=20)
175
 
176
  submit_button.click(fn=transcribe, inputs=[audio_input, audio_language, task, timestamp_type], outputs=[transcript_output, timestamp_output, foul_words, output_audio])
177
  clear_button.add([audio_input, audio_language, task, timestamp_type, transcript_output, timestamp_output, foul_words, output_audio])
178
 
179
 
180
  if __name__ == "__main__":
181
+ demo.launch()