Spaces:
Sleeping
Sleeping
重點摘要(加上 Latex, 刪除關鍵時刻)
Browse files
app.py
CHANGED
|
@@ -918,22 +918,27 @@ def generate_summarise(df_string):
|
|
| 918 |
sys_content = "你是一個擅長資料分析跟影片教學的老師,user 為學生,請精讀資料文本,自行判斷資料的種類,使用 zh-TW"
|
| 919 |
user_content = f"""
|
| 920 |
請根據 {df_string},判斷這份文本
|
| 921 |
-
|
| 922 |
-
|
| 923 |
-
如果是影片類型,請提估影片內容,告訴學生這部影片的意義,
|
| 924 |
整體摘要在一百字以內
|
| 925 |
-
|
| 926 |
-
注意不要遺漏任何一段時間軸的內容
|
| 927 |
-
格式為 【start - end】: 摘要
|
| 928 |
以及可能的結論與結尾延伸小問題提供學生作反思
|
|
|
|
|
|
|
| 929 |
|
| 930 |
整體格式為:
|
| 931 |
-
|
| 932 |
-
|
| 933 |
-
|
| 934 |
-
|
| 935 |
-
|
| 936 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 937 |
"""
|
| 938 |
|
| 939 |
# 🗂️ 1. 內容類型:?
|
|
@@ -2272,8 +2277,6 @@ with gr.Blocks(theme=gr.themes.Base(primary_hue=gr.themes.colors.orange, seconda
|
|
| 2272 |
with gr.Row():
|
| 2273 |
msg = gr.Textbox(label="訊息",scale=3)
|
| 2274 |
send_button = gr.Button("送出", variant="primary", scale=1)
|
| 2275 |
-
|
| 2276 |
-
|
| 2277 |
with gr.Row("飛特音速") as chatbot_open_ai_streaming:
|
| 2278 |
with gr.Column():
|
| 2279 |
streaming_chat_greeting = """
|
|
@@ -2336,7 +2339,7 @@ with gr.Blocks(theme=gr.themes.Base(primary_hue=gr.themes.colors.orange, seconda
|
|
| 2336 |
summary_delete_button = gr.Button("刪除", size="sm", variant="primary")
|
| 2337 |
summary_create_button = gr.Button("建立", size="sm", variant="primary")
|
| 2338 |
with gr.Row():
|
| 2339 |
-
df_summarise = gr.
|
| 2340 |
with gr.Tab("關鍵時刻"):
|
| 2341 |
with gr.Row():
|
| 2342 |
key_moments_html = gr.HTML(value="")
|
|
|
|
| 918 |
sys_content = "你是一個擅長資料分析跟影片教學的老師,user 為學生,請精讀資料文本,自行判斷資料的種類,使用 zh-TW"
|
| 919 |
user_content = f"""
|
| 920 |
請根據 {df_string},判斷這份文本
|
| 921 |
+
格式為 Markdown
|
|
|
|
|
|
|
| 922 |
整體摘要在一百字以內
|
| 923 |
+
重點概念列出 bullet points,至少三個,最多五個
|
|
|
|
|
|
|
| 924 |
以及可能的結論與結尾延伸小問題提供學生作反思
|
| 925 |
+
敘述中,請把數學或是專業術語,用 Latex 包覆($...$)
|
| 926 |
+
加減乘除、根號、次方等等的運算式口語也換成 LATEX 數學符號
|
| 927 |
|
| 928 |
整體格式為:
|
| 929 |
+
## 📚 整體摘要
|
| 930 |
+
- (一個 bullet point....)
|
| 931 |
+
|
| 932 |
+
## 🔖 重點概念
|
| 933 |
+
- xxx
|
| 934 |
+
- xxx
|
| 935 |
+
- xxx
|
| 936 |
+
|
| 937 |
+
## 💡 為什麼我們要學這個?
|
| 938 |
+
- (一個 bullet point....)
|
| 939 |
+
|
| 940 |
+
## ❓ 延伸小問題
|
| 941 |
+
- (一個 bullet point....)
|
| 942 |
"""
|
| 943 |
|
| 944 |
# 🗂️ 1. 內容類型:?
|
|
|
|
| 2277 |
with gr.Row():
|
| 2278 |
msg = gr.Textbox(label="訊息",scale=3)
|
| 2279 |
send_button = gr.Button("送出", variant="primary", scale=1)
|
|
|
|
|
|
|
| 2280 |
with gr.Row("飛特音速") as chatbot_open_ai_streaming:
|
| 2281 |
with gr.Column():
|
| 2282 |
streaming_chat_greeting = """
|
|
|
|
| 2339 |
summary_delete_button = gr.Button("刪除", size="sm", variant="primary")
|
| 2340 |
summary_create_button = gr.Button("建立", size="sm", variant="primary")
|
| 2341 |
with gr.Row():
|
| 2342 |
+
df_summarise = gr.Markdown(show_label=False, latex_delimiters = [{"left": "$", "right": "$", "display": False}])
|
| 2343 |
with gr.Tab("關鍵時刻"):
|
| 2344 |
with gr.Row():
|
| 2345 |
key_moments_html = gr.HTML(value="")
|