Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -32,9 +32,10 @@ def search_videos(keyword):
|
|
32 |
response = requests.get(url, headers=headers, params=params)
|
33 |
data = response.json()
|
34 |
|
35 |
-
# κ²μλ λΉλμ€μ URLμ
|
36 |
-
|
37 |
-
|
|
|
38 |
|
39 |
with gr.Blocks() as demo:
|
40 |
with gr.Tabs():
|
@@ -45,7 +46,7 @@ with gr.Blocks() as demo:
|
|
45 |
|
46 |
with gr.Tab("λΉλμ€ κ²μ"):
|
47 |
video_search_input = gr.Textbox(label="κ²μ ν€μλ")
|
48 |
-
video_search_output = gr.
|
49 |
video_search_input.change(search_videos, inputs=video_search_input, outputs=video_search_output)
|
50 |
|
51 |
demo.launch()
|
|
|
32 |
response = requests.get(url, headers=headers, params=params)
|
33 |
data = response.json()
|
34 |
|
35 |
+
# κ²μλ λΉλμ€μ URLμ Markdown λ§ν¬λ‘ λ³ν
|
36 |
+
video_links = [f"[Video Link]({video['video_files'][0]['link']})" for video in data['videos']]
|
37 |
+
markdown_links = "\n".join(video_links)
|
38 |
+
return markdown_links
|
39 |
|
40 |
with gr.Blocks() as demo:
|
41 |
with gr.Tabs():
|
|
|
46 |
|
47 |
with gr.Tab("λΉλμ€ κ²μ"):
|
48 |
video_search_input = gr.Textbox(label="κ²μ ν€μλ")
|
49 |
+
video_search_output = gr.Markdown(label="κ²μλ λΉλμ€")
|
50 |
video_search_input.change(search_videos, inputs=video_search_input, outputs=video_search_output)
|
51 |
|
52 |
demo.launch()
|