Update app.py
Browse files
app.py
CHANGED
|
@@ -363,7 +363,7 @@ demo.encrypt = False
|
|
| 363 |
|
| 364 |
|
| 365 |
with demo:
|
| 366 |
-
with gr.Tab("Whisper
|
| 367 |
gr.Markdown('''
|
| 368 |
<div>
|
| 369 |
<h1 style='text-align: center'>Whisper speaker diarization</h1>
|
|
@@ -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)
|
|
|
|
| 363 |
|
| 364 |
|
| 365 |
with demo:
|
| 366 |
+
with gr.Tab("Whisper AI"):
|
| 367 |
gr.Markdown('''
|
| 368 |
<div>
|
| 369 |
<h1 style='text-align: center'>Whisper speaker diarization</h1>
|
|
|
|
| 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)
|