Spaces:
Build error
Build error
yama
commited on
Commit
·
e289508
1
Parent(s):
07f47a8
Update app.py
Browse files
app.py
CHANGED
@@ -273,12 +273,12 @@ def create_transcription_summary(openai_key, prompt, transcript_result_path):
|
|
273 |
return transcript_summary
|
274 |
|
275 |
|
276 |
-
def transcription_summary_btn_click_callback():
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
|
283 |
|
284 |
# ---- Gradio Layout -----
|
@@ -307,6 +307,8 @@ openai_prompt_in = gr.TextArea(label="openai_prompt", value="""会議の文字
|
|
307 |
- 会議の内容
|
308 |
- 会議の結果""")
|
309 |
transcription_summary_out = gr.Textbox(label="transcription_summary")
|
|
|
|
|
310 |
title = "Whisper speaker diarization"
|
311 |
demo = gr.Blocks(title=title)
|
312 |
demo.encrypt = False
|
@@ -382,12 +384,15 @@ with demo:
|
|
382 |
with gr.Column():
|
383 |
openai_key_in.render()
|
384 |
openai_prompt_in.render()
|
385 |
-
|
386 |
-
|
|
|
|
|
|
|
387 |
|
388 |
with gr.Row():
|
389 |
with gr.Column():
|
390 |
-
|
391 |
system_info.render()
|
392 |
gr.Markdown(
|
393 |
'''<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>''')
|
|
|
273 |
return transcript_summary
|
274 |
|
275 |
|
276 |
+
# def transcription_summary_btn_click_callback():
|
277 |
+
# openai_key = openai_key_in.value
|
278 |
+
# prompt = openai_prompt_in.value
|
279 |
+
# transcript_result_path = "output/transcript_result.csv"
|
280 |
+
# transcript_summary = create_transcription_summary(openai_key, prompt, transcript_result_path)
|
281 |
+
# transcription_summary_out.value = transcript_summary
|
282 |
|
283 |
|
284 |
# ---- Gradio Layout -----
|
|
|
307 |
- 会議の内容
|
308 |
- 会議の結果""")
|
309 |
transcription_summary_out = gr.Textbox(label="transcription_summary")
|
310 |
+
openai_summary_out = gr.Textbox(label="openai_summary")
|
311 |
+
|
312 |
title = "Whisper speaker diarization"
|
313 |
demo = gr.Blocks(title=title)
|
314 |
demo.encrypt = False
|
|
|
384 |
with gr.Column():
|
385 |
openai_key_in.render()
|
386 |
openai_prompt_in.render()
|
387 |
+
openai_summary_btn = gr.Button("Evaluate and analyze transcription content")
|
388 |
+
openai_summary_btn.click(create_transcription_summary,
|
389 |
+
[openai_key_in, openai_prompt_in, "output/transcript_result.csv"],
|
390 |
+
[openai_summary_out]
|
391 |
+
)
|
392 |
|
393 |
with gr.Row():
|
394 |
with gr.Column():
|
395 |
+
openai_summary_out.render()
|
396 |
system_info.render()
|
397 |
gr.Markdown(
|
398 |
'''<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>''')
|