Spaces:
Build error
Build error
yama
commited on
Commit
•
31144fa
1
Parent(s):
67aa049
Update app.py
Browse files
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 |
-
|
445 |
-
|
446 |
-
|
447 |
-
|
448 |
-
|
449 |
-
|
450 |
-
|
451 |
-
|
452 |
-
|
453 |
-
|
454 |
-
|
455 |
-
|
456 |
-
|
457 |
-
|
458 |
-
|
459 |
-
|
460 |
-
|
461 |
-
|
462 |
-
|
463 |
-
|
464 |
-
|
465 |
-
|
466 |
-
with gr.Tab("Whisper Transcribe Japanese YouTube"):
|
467 |
-
|
468 |
-
|
469 |
-
|
470 |
-
|
471 |
-
|
472 |
-
|
473 |
-
|
474 |
-
|
475 |
-
|
476 |
-
|
477 |
-
|
478 |
-
|
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)
|