Spaces:
Sleeping
Sleeping
Commit
โข
cfd9d13
1
Parent(s):
803d7a3
Update app.py
Browse files
app.py
CHANGED
@@ -2,7 +2,7 @@ import gradio as gr
|
|
2 |
import requests
|
3 |
|
4 |
# Pexels API ํค ์ค์
|
5 |
-
PEXELS_API_KEY = '
|
6 |
|
7 |
def search_images(keyword):
|
8 |
headers = {
|
@@ -32,10 +32,9 @@ def search_videos(keyword):
|
|
32 |
response = requests.get(url, headers=headers, params=params)
|
33 |
data = response.json()
|
34 |
|
35 |
-
# ๊ฒ์๋ ๋น๋์ค์ URL์
|
36 |
-
|
37 |
-
|
38 |
-
return markdown_links
|
39 |
|
40 |
with gr.Blocks() as demo:
|
41 |
with gr.Tabs():
|
|
|
2 |
import requests
|
3 |
|
4 |
# Pexels API ํค ์ค์
|
5 |
+
PEXELS_API_KEY = '์ฌ๊ธฐ์_๋น์ ์_API_ํค๋ฅผ_์
๋ ฅํ์ธ์'
|
6 |
|
7 |
def search_images(keyword):
|
8 |
headers = {
|
|
|
32 |
response = requests.get(url, headers=headers, params=params)
|
33 |
data = response.json()
|
34 |
|
35 |
+
# ๊ฒ์๋ ๋น๋์ค์ ๋ค์ด๋ก๋ ๊ฐ๋ฅํ URL์ ๋ฆฌ์คํธ๋ก ์ถ์ถ
|
36 |
+
video_download_links = [video['video_files'][0]['link'] for video in data['videos']]
|
37 |
+
return video_download_links
|
|
|
38 |
|
39 |
with gr.Blocks() as demo:
|
40 |
with gr.Tabs():
|