Spaces:
Sleeping
Sleeping
if "yt_id" in gr.args:
Browse files
app.py
CHANGED
@@ -906,4 +906,10 @@ if TRANSCRIPTS: # 确保列表不为空
|
|
906 |
image.update(value=first_screenshot_path)
|
907 |
text.update(value=first_text)
|
908 |
|
|
|
|
|
|
|
|
|
|
|
|
|
909 |
demo.launch(allowed_paths=["videos"])
|
|
|
906 |
image.update(value=first_screenshot_path)
|
907 |
text.update(value=first_text)
|
908 |
|
909 |
+
# 假設 url params 有 video_id,yt_id=VIDEO_ID
|
910 |
+
# 如果有 yt_id,就貼上youtube_link
|
911 |
+
if "yt_id" in gr.args:
|
912 |
+
yt_id = gr.args["yt_id"]
|
913 |
+
youtube_link.update(value=f"https://www.youtube.com/watch?v={yt_id}")
|
914 |
+
|
915 |
demo.launch(allowed_paths=["videos"])
|