video_bot_999 / app.py

Commit History

延伸小問題
c877074

youngtsai commited on

注意不要遺漏任何一段時間軸的內容
f2abd28

youngtsai commited on

並在大標題前面加上 emoji 表情符號,讓學生更容易理解
37d67fd

youngtsai commited on

, visible=False
04feb11

youngtsai commited on

如果是影片類型,不用解釋逐字稿格式,直接回答學生問題
b47895d

youngtsai commited on

但可以給予一些提示跟引導,例如給予影片的時間軸,讓學生自己去找答案
60384bf

youngtsai commited on

格式為 【start - end】: 摘要
afb0037

youngtsai commited on

formatted_simple_transcript.append(simple_line)
ef2b19a

youngtsai commited on

df_summarise = generate_df_summarise(formatted_transcript)
1b3ea4e

youngtsai commited on

格式為 【start - end】: 摘要,秒數請無條件捨去小數點,並取整數後,根據秒的整數將時間格式改為 hh:mm:ss
c6c3806

youngtsai commited on

小範圍切出不同段落的相對應時間軸的重點摘要,最多不超過五段
2ffe535

youngtsai commited on

小範圍切出不同段落的相對應時間軸的重點摘要,格式為 【start - end】: 摘要,秒數請取整數後,將時間格式改為 hh:mm:ss
13b1c8e

youngtsai commited on

小範圍切出不同段落的相對應時間軸的重點摘要,格式為 【start - end】: 摘要,秒數請取整數,時間格式為 hh:mm:ss
a86ec99

youngtsai commited on

切出不同段落的相對應時間軸的重點摘要,格式為 【start - end】: 摘要,秒數請取整數,時間格式為 hh:mm:ss
9503cd0

youngtsai commited on

切出不同段落的相對應時間軸的重點摘要,格式為 【start - end】: 摘要,秒數請取整數
0fd7d42

youngtsai commited on

如果學生的問題與資料文本無關,請告訴學生你無法回答超出範圍的問題
367ea1f

youngtsai commited on

如果是影片類型,請提估影片內容,告訴學生這部影片的意義,切出不同段落的相對應時間軸的重點摘要,以及可能的結論與結尾小問答提供學生作反思
99d0f80

youngtsai commited on

youtube_link.change(process_youtube_link, inputs=youtube_link, outputs=[btn_1, btn_2, btn_3, df_string_output, df_summarise, transcript_html, slide_image, slide_text])
9594b3b

youngtsai commited on

df_string_output = gr.Textbox(lines=40, label="Data Text")
9ad6413

youngtsai commited on

screenshot_path = f"https://lh3.googleusercontent.com/d/{img_file_id}=s4000"
3edbe8e

youngtsai commited on

screenshot_path = f"https://lh3.googleusercontent.com/d/{img_file_id}=s4000"
d52b5e8

youngtsai commited on

screenshot_path
1fe1616

youngtsai commited on

print("=== 更新投影片 ===")
5d4794c

youngtsai commited on

with gr.Tab("截圖與逐字稿"):
697d377

youngtsai commited on

CURRENT_INDEX
e1d77be

youngtsai commited on

prev_button.click(fn=prev_slide, inputs=[], outputs=[image, text])
6afedbf

youngtsai commited on

current_index = 0
2efd672

youngtsai commited on

TRASCRIPTS = []
b5201dc

youngtsai commited on

html_content_container
123a4b1

youngtsai commited on

def format_transcript_to_html(formatted_transcript):
d230f8b

youngtsai commited on

from youtube_transcript_api._errors import NoTranscriptFound
d363c44

youngtsai commited on

你是一個擅長資料分析跟影片教學的老師
c7454f7

youngtsai commited on

df_string_output = json.dumps(transcript, ensure_ascii=False, indent=2)
a9eaf66

youngtsai commited on

screenshot_path = f"https://drive.google.com/thumbnail?id={img_file_id}&sz=s4000"
ae88c8d

youngtsai commited on

img_src = f"https://drive.google.com/thumbnail?id={img_file_id}&sz=s4000"
5408edf

youngtsai commited on

screenshot_path = screenshot_youtube_video(video_id, entry['start'])
d346e8c

youngtsai commited on

print("====process_transcript_and_screenshots====")
6d95426

youngtsai commited on

set_public_permission
9abfccc

youngtsai commited on

def process_transcript_and_screenshots(video_id):
d22eec5

youngtsai commited on

transcript = process_transcript_and_screenshots(video_id)
f99c291

youngtsai commited on

def screenshot_youtube_video(youtube_id, snapshot_sec):
c05c5f9

youngtsai commited on

upload_img_directly(service, file_name, folder_id, screenshot_path)
a028c47

youngtsai commited on

from googleapiclient.http import MediaIoBaseDownload
a69bace

youngtsai commited on

print("逐字稿已存在于Google Drive中")
a48473e

youngtsai commited on

transcript_text = json.dumps(transcript, ensure_ascii=False, indent=2)
474b2c8

youngtsai commited on

upload_content_directly
1ae05ec

youngtsai commited on