Update app.py
Browse files
app.py
CHANGED
|
@@ -222,7 +222,7 @@ def create_ui():
|
|
| 222 |
|
| 223 |
def on_select_with_link(space):
|
| 224 |
info, app_content, url = on_select(space)
|
| 225 |
-
info += f"\n\n
|
| 226 |
return info, app_content, url
|
| 227 |
|
| 228 |
for _, button, space in space_rows:
|
|
@@ -236,20 +236,18 @@ def create_ui():
|
|
| 236 |
outputs=[screenshot_output, last_url_state]
|
| 237 |
)
|
| 238 |
|
| 239 |
-
def
|
| 240 |
-
|
| 241 |
-
|
| 242 |
-
|
| 243 |
-
|
| 244 |
-
"""
|
| 245 |
|
| 246 |
open_space_button.click(
|
| 247 |
-
|
| 248 |
inputs=[url_state],
|
| 249 |
-
outputs=[gr.
|
| 250 |
)
|
| 251 |
|
| 252 |
-
|
| 253 |
def refresh_screenshot(url, last_url):
|
| 254 |
print(f"Refresh button clicked. URL: {url}, Last URL: {last_url}")
|
| 255 |
return update_screenshot(url, last_url)
|
|
|
|
| 222 |
|
| 223 |
def on_select_with_link(space):
|
| 224 |
info, app_content, url = on_select(space)
|
| 225 |
+
info += f"\n\n์ ํํ Space URL: {url}"
|
| 226 |
return info, app_content, url
|
| 227 |
|
| 228 |
for _, button, space in space_rows:
|
|
|
|
| 236 |
outputs=[screenshot_output, last_url_state]
|
| 237 |
)
|
| 238 |
|
| 239 |
+
def open_space_in_browser(url):
|
| 240 |
+
if url:
|
| 241 |
+
webbrowser.open(url)
|
| 242 |
+
return f"'{url}' ์ฃผ์๊ฐ ์ ํญ์์ ์ด๋ ธ์ต๋๋ค."
|
| 243 |
+
return "์ ํ๋ Space๊ฐ ์์ต๋๋ค."
|
|
|
|
| 244 |
|
| 245 |
open_space_button.click(
|
| 246 |
+
open_space_in_browser,
|
| 247 |
inputs=[url_state],
|
| 248 |
+
outputs=[gr.Textbox(label="์ํ ๋ฉ์์ง")]
|
| 249 |
)
|
| 250 |
|
|
|
|
| 251 |
def refresh_screenshot(url, last_url):
|
| 252 |
print(f"Refresh button clicked. URL: {url}, Last URL: {last_url}")
|
| 253 |
return update_screenshot(url, last_url)
|