Spaces:
Sleeping
Sleeping
key_moments_text
Browse files
app.py
CHANGED
|
@@ -615,6 +615,7 @@ def process_youtube_link(password, link):
|
|
| 615 |
summary = summary_json["summary"]
|
| 616 |
key_moments_json = get_key_moments(video_id, formatted_simple_transcript, formatted_transcript, source)
|
| 617 |
key_moments = key_moments_json["key_moments"]
|
|
|
|
| 618 |
key_moments_html = get_key_moments_html(key_moments)
|
| 619 |
html_content = format_transcript_to_html(formatted_transcript)
|
| 620 |
simple_html_content = format_simple_transcript_to_html(formatted_simple_transcript)
|
|
@@ -637,6 +638,7 @@ def process_youtube_link(password, link):
|
|
| 637 |
questions[2] if len(questions) > 2 else "", \
|
| 638 |
original_transcript, \
|
| 639 |
summary, \
|
|
|
|
| 640 |
key_moments_html, \
|
| 641 |
mind_map, \
|
| 642 |
mind_map_html, \
|
|
@@ -2207,7 +2209,14 @@ with gr.Blocks(theme=gr.themes.Base(primary_hue=gr.themes.colors.orange, seconda
|
|
| 2207 |
with gr.Row():
|
| 2208 |
df_string_output = gr.Textbox(lines=40, label="Data Text", )
|
| 2209 |
with gr.Tab("關鍵時刻本文"):
|
| 2210 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2211 |
with gr.Tab("逐字稿"):
|
| 2212 |
simple_html_content = gr.HTML(label="Simple Transcript")
|
| 2213 |
with gr.Tab("圖文"):
|
|
@@ -2301,6 +2310,7 @@ with gr.Blocks(theme=gr.themes.Base(primary_hue=gr.themes.colors.orange, seconda
|
|
| 2301 |
btn_3,
|
| 2302 |
df_string_output,
|
| 2303 |
df_summarise,
|
|
|
|
| 2304 |
key_moments_html,
|
| 2305 |
mind_map,
|
| 2306 |
mind_map_html,
|
|
|
|
| 615 |
summary = summary_json["summary"]
|
| 616 |
key_moments_json = get_key_moments(video_id, formatted_simple_transcript, formatted_transcript, source)
|
| 617 |
key_moments = key_moments_json["key_moments"]
|
| 618 |
+
key_moments_text = json.dumps(key_moments, ensure_ascii=False, indent=2)
|
| 619 |
key_moments_html = get_key_moments_html(key_moments)
|
| 620 |
html_content = format_transcript_to_html(formatted_transcript)
|
| 621 |
simple_html_content = format_simple_transcript_to_html(formatted_simple_transcript)
|
|
|
|
| 638 |
questions[2] if len(questions) > 2 else "", \
|
| 639 |
original_transcript, \
|
| 640 |
summary, \
|
| 641 |
+
key_moments_text, \
|
| 642 |
key_moments_html, \
|
| 643 |
mind_map, \
|
| 644 |
mind_map_html, \
|
|
|
|
| 2209 |
with gr.Row():
|
| 2210 |
df_string_output = gr.Textbox(lines=40, label="Data Text", )
|
| 2211 |
with gr.Tab("關鍵時刻本文"):
|
| 2212 |
+
with gr.Row() as key_moments_admin:
|
| 2213 |
+
key_moments_kind = gr.Textbox(value="key_moments", show_label=False)
|
| 2214 |
+
key_moments_edit_button = gr.Button("編輯", size="sm", variant="primary")
|
| 2215 |
+
key_moments_update_button = gr.Button("更新", size="sm", variant="primary")
|
| 2216 |
+
key_moments_delete_button = gr.Button("刪除", size="sm", variant="primary")
|
| 2217 |
+
key_moments_create_button = gr.Button("建立", size="sm", variant="primary")
|
| 2218 |
+
with gr.Row():
|
| 2219 |
+
key_moments = gr.Textbox(label="Key Moments", lines=40)
|
| 2220 |
with gr.Tab("逐字稿"):
|
| 2221 |
simple_html_content = gr.HTML(label="Simple Transcript")
|
| 2222 |
with gr.Tab("圖文"):
|
|
|
|
| 2310 |
btn_3,
|
| 2311 |
df_string_output,
|
| 2312 |
df_summarise,
|
| 2313 |
+
key_moments,
|
| 2314 |
key_moments_html,
|
| 2315 |
mind_map,
|
| 2316 |
mind_map_html,
|