raihanrifaldi commited on
Commit
d6b4ed2
·
1 Parent(s): 027123e

upload fitur

Browse files
Files changed (1) hide show
  1. app.py +35 -35
app.py CHANGED
@@ -447,41 +447,41 @@ with demo:
447
 
448
 
449
 
450
- # with gr.Tab("Whisper Transcribe Japanese Audio"):
451
- # gr.Markdown(f'''
452
- # <div>
453
- # <h1 style='text-align: center'>Whisper Transcribe Japanese Audio</h1>
454
- # </div>
455
- # Transcribe long-form microphone or audio inputs with the click of a button! The fine-tuned
456
- # checkpoint <a href='https://huggingface.co/{MODEL_NAME}' target='_blank'><b>{MODEL_NAME}</b></a> to transcribe audio files of arbitrary length.
457
- # ''')
458
- # microphone = gr.inputs.Audio(source="microphone", type="filepath", optional=True)
459
- # upload = gr.inputs.Audio(source="upload", type="filepath", optional=True)
460
- # transcribe_btn = gr.Button("Transcribe Audio")
461
- # text_output = gr.Textbox()
462
- # with gr.Row():
463
- # gr.Markdown('''
464
- # ### You can test by following examples:
465
- # ''')
466
- # examples = gr.Examples(examples=
467
- # [ "sample1.wav",
468
- # "sample2.wav",
469
- # ],
470
- # label="Examples", inputs=[upload])
471
- # transcribe_btn.click(transcribe, [microphone, upload], outputs=text_output)
472
 
473
- # with gr.Tab("Whisper Transcribe Japanese YouTube"):
474
- # gr.Markdown(f'''
475
- # <div>
476
- # <h1 style='text-align: center'>Whisper Transcribe Japanese YouTube</h1>
477
- # </div>
478
- # Transcribe long-form YouTube videos with the click of a button! The fine-tuned checkpoint:
479
- # <a href='https://huggingface.co/{MODEL_NAME}' target='_blank'><b>{MODEL_NAME}</b></a> to transcribe audio files of arbitrary length.
480
- # ''')
481
- # youtube_link = gr.Textbox(label="Youtube url", lines=1, interactive=True)
482
- # yt_transcribe_btn = gr.Button("Transcribe YouTube")
483
- # text_output2 = gr.Textbox()
484
- # html_output = gr.Markdown()
485
- # yt_transcribe_btn.click(yt_transcribe, [youtube_link], outputs=[html_output, text_output2])
486
 
487
  demo.launch(debug=True)
 
447
 
448
 
449
 
450
+ with gr.Tab("Whisper Transcribe Indonesia Audio"):
451
+ gr.Markdown(f'''
452
+ <div>
453
+ <h1 style='text-align: center'>Whisper Transcribe Indonesia Audio</h1>
454
+ </div>
455
+ Transcribe long-form microphone or audio inputs with the click of a button! The fine-tuned
456
+ checkpoint <a href='https://huggingface.co/{MODEL_NAME}' target='_blank'><b>{MODEL_NAME}</b></a> to transcribe audio files of arbitrary length.
457
+ ''')
458
+ microphone = gr.inputs.Audio(source="microphone", type="filepath", optional=True)
459
+ upload = gr.inputs.Audio(source="upload", type="filepath", optional=True)
460
+ transcribe_btn = gr.Button("Transcribe Audio")
461
+ text_output = gr.Textbox()
462
+ with gr.Row():
463
+ gr.Markdown('''
464
+ ### You can test by following examples:
465
+ ''')
466
+ examples = gr.Examples(examples=
467
+ [ "sample1.wav",
468
+ "sample2.wav",
469
+ ],
470
+ label="Examples", inputs=[upload])
471
+ transcribe_btn.click(transcribe, [microphone, upload], outputs=text_output)
472
 
473
+ with gr.Tab("Whisper Transcribe Indonesia YouTube"):
474
+ gr.Markdown(f'''
475
+ <div>
476
+ <h1 style='text-align: center'>Whisper Transcribe Indonesia YouTube</h1>
477
+ </div>
478
+ Transcribe long-form YouTube videos with the click of a button! The fine-tuned checkpoint:
479
+ <a href='https://huggingface.co/{MODEL_NAME}' target='_blank'><b>{MODEL_NAME}</b></a> to transcribe audio files of arbitrary length.
480
+ ''')
481
+ youtube_link = gr.Textbox(label="Youtube url", lines=1, interactive=True)
482
+ yt_transcribe_btn = gr.Button("Transcribe YouTube")
483
+ text_output2 = gr.Textbox()
484
+ html_output = gr.Markdown()
485
+ yt_transcribe_btn.click(yt_transcribe, [youtube_link], outputs=[html_output, text_output2])
486
 
487
  demo.launch(debug=True)