Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -15,14 +15,15 @@ def google_image_search(query):
|
|
15 |
image_url = item['link']
|
16 |
image_urls.append(image_url)
|
17 |
|
18 |
-
|
|
|
19 |
|
20 |
# Gradio ์ธํฐํ์ด์ค ์ ์
|
21 |
iface = gr.Interface(fn=google_image_search,
|
22 |
inputs=gr.Textbox(lines=2, placeholder="๊ฒ์ํ ์ด๋ฏธ์ง์ ํ
์คํธ๋ฅผ ์
๋ ฅํ์ธ์..."),
|
23 |
-
outputs=gr.
|
24 |
title="๊ตฌ๊ธ ์ด๋ฏธ์ง ๊ฒ์",
|
25 |
-
description="ํ
์คํธ๋ฅผ ์
๋ ฅํ๋ฉด ๊ตฌ๊ธ ์ด๋ฏธ์ง ๊ฒ์
|
26 |
|
27 |
# ์ธํฐํ์ด์ค ์คํ
|
28 |
iface.launch()
|
|
|
15 |
image_url = item['link']
|
16 |
image_urls.append(image_url)
|
17 |
|
18 |
+
# ์ด๋ฏธ์ง URL ๋ฆฌ์คํธ๋ฅผ ๋ฌธ์์ด๋ก ๋ณํํ์ฌ ๋ฐํ
|
19 |
+
return "\n".join(image_urls)
|
20 |
|
21 |
# Gradio ์ธํฐํ์ด์ค ์ ์
|
22 |
iface = gr.Interface(fn=google_image_search,
|
23 |
inputs=gr.Textbox(lines=2, placeholder="๊ฒ์ํ ์ด๋ฏธ์ง์ ํ
์คํธ๋ฅผ ์
๋ ฅํ์ธ์..."),
|
24 |
+
outputs=gr.Textbox(label="๊ฒ์ ๊ฒฐ๊ณผ URL"),
|
25 |
title="๊ตฌ๊ธ ์ด๋ฏธ์ง ๊ฒ์",
|
26 |
+
description="ํ
์คํธ๋ฅผ ์
๋ ฅํ๋ฉด ๊ตฌ๊ธ ์ด๋ฏธ์ง ๊ฒ์ ๊ฒฐ๊ณผ์ ์ด๋ฏธ์ง URL์ ๋ณด์ฌ์ค๋๋ค.")
|
27 |
|
28 |
# ์ธํฐํ์ด์ค ์คํ
|
29 |
iface.launch()
|