yama commited on
Commit
31144fa
1 Parent(s): 67aa049

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +43 -36
app.py CHANGED
@@ -369,6 +369,13 @@ system_info = gr.Markdown(
369
  download_transcript = gr.File(label="Download transcript")
370
  transcription_df = gr.DataFrame(value=df_init, label="Transcription dataframe", row_count=(0, "dynamic"), max_rows=10,
371
  wrap=True, overflow_row_behaviour='paginate')
 
 
 
 
 
 
 
372
  title = "Whisper speaker diarization"
373
  demo = gr.Blocks(title=title)
374
  demo.encrypt = False
@@ -440,41 +447,41 @@ with demo:
440
  gr.Markdown(
441
  '''<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>''')
442
 
443
- with gr.Tab("Whisper Transcribe Japanese Audio"):
444
- gr.Markdown(f'''
445
- <div>
446
- <h1 style='text-align: center'>Whisper Transcribe Japanese Audio</h1>
447
- </div>
448
- Transcribe long-form microphone or audio inputs with the click of a button! The fine-tuned
449
- checkpoint <a href='https://huggingface.co/{MODEL_NAME}' target='_blank'><b>{MODEL_NAME}</b></a> to transcribe audio files of arbitrary length.
450
- ''')
451
- microphone = gr.inputs.Audio(source="microphone", type="filepath", optional=True)
452
- upload = gr.inputs.Audio(source="upload", type="filepath", optional=True)
453
- transcribe_btn = gr.Button("Transcribe Audio")
454
- text_output = gr.Textbox()
455
- with gr.Row():
456
- gr.Markdown('''
457
- ### You can test by following examples:
458
- ''')
459
- examples = gr.Examples(examples=
460
- ["sample1.wav",
461
- "sample2.wav",
462
- ],
463
- label="Examples", inputs=[upload])
464
- transcribe_btn.click(transcribe, [microphone, upload], outputs=text_output)
465
-
466
- with gr.Tab("Whisper Transcribe Japanese YouTube"):
467
- gr.Markdown(f'''
468
- <div>
469
- <h1 style='text-align: center'>Whisper Transcribe Japanese YouTube</h1>
470
- </div>
471
- Transcribe long-form YouTube videos with the click of a button! The fine-tuned checkpoint:
472
- <a href='https://huggingface.co/{MODEL_NAME}' target='_blank'><b>{MODEL_NAME}</b></a> to transcribe audio files of arbitrary length.
473
- ''')
474
- youtube_link = gr.Textbox(label="Youtube url", lines=1, interactive=True)
475
- yt_transcribe_btn = gr.Button("Transcribe YouTube")
476
- text_output2 = gr.Textbox()
477
- html_output = gr.Markdown()
478
- yt_transcribe_btn.click(yt_transcribe, [youtube_link], outputs=[html_output, text_output2])
479
 
480
  demo.launch(debug=True)
 
369
  download_transcript = gr.File(label="Download transcript")
370
  transcription_df = gr.DataFrame(value=df_init, label="Transcription dataframe", row_count=(0, "dynamic"), max_rows=10,
371
  wrap=True, overflow_row_behaviour='paginate')
372
+ openai_key_in = gr.Textbox(lines=1, label="openai_key", type="password")
373
+ openai_prompt_in = gr.TextArea(label="openai_prompt", value="""会議の文字起こしが渡されます。
374
+ この会議のサマリーをMarkdown形式で作成してください。サマリーは、以下のような形式で書いてください。
375
+ - 会議の目的
376
+ - 会議の内容
377
+ - 会議の結果""")
378
+ transcription_summary = gr.Textbox(label="summary")
379
  title = "Whisper speaker diarization"
380
  demo = gr.Blocks(title=title)
381
  demo.encrypt = False
 
447
  gr.Markdown(
448
  '''<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>''')
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)