Persival123 commited on
Commit
4c25cef
·
1 Parent(s): 060e3d2

Upload app.py

Browse files
Files changed (1) hide show
  1. app.py +0 -40
app.py CHANGED
@@ -430,44 +430,4 @@ with demo:
430
  transcription_df.render()
431
  system_info.render()
432
  gr.Markdown('''<center><img src='https://visitor-badge.glitch.me/badge?page_id=WhisperDiarizationSpeakers' alt='visitor badge'><a href="https://opensource.org/licenses/Apache-2.0"><img src='https://img.shields.io/badge/License-Apache_2.0-blue.svg' alt='License: Apache 2.0'></center>''')
433
-
434
-
435
-
436
- with gr.Tab("Whisper Transcribe Japanese Audio"):
437
- gr.Markdown(f'''
438
- <div>
439
- <h1 style='text-align: center'>Whisper Transcribe Japanese Audio</h1>
440
- </div>
441
- Transcribe long-form microphone or audio inputs with the click of a button! The fine-tuned
442
- checkpoint <a href='https://huggingface.co/{MODEL_NAME}' target='_blank'><b>{MODEL_NAME}</b></a> to transcribe audio files of arbitrary length.
443
- ''')
444
- microphone = gr.inputs.Audio(source="microphone", type="filepath", optional=True)
445
- upload = gr.inputs.Audio(source="upload", type="filepath", optional=True)
446
- transcribe_btn = gr.Button("Transcribe Audio")
447
- text_output = gr.Textbox()
448
- with gr.Row():
449
- gr.Markdown('''
450
- ### You can test by following examples:
451
- ''')
452
- examples = gr.Examples(examples=
453
- [ "sample1.wav",
454
- "sample2.wav",
455
- ],
456
- label="Examples", inputs=[upload])
457
- transcribe_btn.click(transcribe, [microphone, upload], outputs=text_output)
458
-
459
- with gr.Tab("Whisper Transcribe Japanese YouTube"):
460
- gr.Markdown(f'''
461
- <div>
462
- <h1 style='text-align: center'>Whisper Transcribe Japanese YouTube</h1>
463
- </div>
464
- Transcribe long-form YouTube videos with the click of a button! The fine-tuned checkpoint:
465
- <a href='https://huggingface.co/{MODEL_NAME}' target='_blank'><b>{MODEL_NAME}</b></a> to transcribe audio files of arbitrary length.
466
- ''')
467
- youtube_link = gr.Textbox(label="Youtube url", lines=1, interactive=True)
468
- yt_transcribe_btn = gr.Button("Transcribe YouTube")
469
- text_output2 = gr.Textbox()
470
- html_output = gr.Markdown()
471
- yt_transcribe_btn.click(yt_transcribe, [youtube_link], outputs=[html_output, text_output2])
472
-
473
  demo.launch(debug=True)
 
430
  transcription_df.render()
431
  system_info.render()
432
  gr.Markdown('''<center><img src='https://visitor-badge.glitch.me/badge?page_id=WhisperDiarizationSpeakers' alt='visitor badge'><a href="https://opensource.org/licenses/Apache-2.0"><img src='https://img.shields.io/badge/License-Apache_2.0-blue.svg' alt='License: Apache 2.0'></center>''')
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
433
  demo.launch(debug=True)