Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
-
from serpapi import GoogleSearch
|
2 |
import gradio as gr
|
|
|
3 |
|
4 |
# SERP API ํค ์ค์
|
5 |
API_KEY = "facc404e1b9394771101069c8ea6984719db4b437136cb33f7935e67dad7093f"
|
@@ -19,8 +19,6 @@ def search_and_show_image(query):
|
|
19 |
organic_results = results.get("organic_results", [])
|
20 |
|
21 |
if organic_results:
|
22 |
-
# ์ฒซ ๋ฒ์งธ ๊ฒ์ ๊ฒฐ๊ณผ์ ์คํฌ๋ฆฐ์ท ์ด๋ฏธ์ง URL์ ๊ฐ์ ธ์ต๋๋ค.
|
23 |
-
# ์คํฌ๋ฆฐ์ท ์ด๋ฏธ์ง๊ฐ ์๋ ๊ฒฝ์ฐ, ๋์ฒด ํ
์คํธ๋ฅผ ๋ฐํํฉ๋๋ค.
|
24 |
first_result = organic_results[0]
|
25 |
screenshot_url = first_result.get("screenshot", {}).get("src", "No screenshot available for this result.")
|
26 |
return screenshot_url
|
|
|
|
|
1 |
import gradio as gr
|
2 |
+
from serpapi import GoogleSearch # ์์ ๋ ๋ถ๋ถ์ด ์์ผ๋, ์ด๋ ๋ฌธ์ ์ ์์ธ์ ์ ํํ ํ์
ํ๊ธฐ ์ํ ์์์
๋๋ค.
|
3 |
|
4 |
# SERP API ํค ์ค์
|
5 |
API_KEY = "facc404e1b9394771101069c8ea6984719db4b437136cb33f7935e67dad7093f"
|
|
|
19 |
organic_results = results.get("organic_results", [])
|
20 |
|
21 |
if organic_results:
|
|
|
|
|
22 |
first_result = organic_results[0]
|
23 |
screenshot_url = first_result.get("screenshot", {}).get("src", "No screenshot available for this result.")
|
24 |
return screenshot_url
|