Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -13,18 +13,14 @@ from datetime import datetime
|
|
13 |
import gradio as gr
|
14 |
from typing import Tuple
|
15 |
import time
|
16 |
-
|
17 |
-
from pathlib import Path
|
18 |
-
|
19 |
|
20 |
# ์คํฌ๋ฆฐ์ท ์บ์ ๋๋ ํ ๋ฆฌ ์ค์
|
21 |
CACHE_DIR = Path("screenshot_cache")
|
22 |
CACHE_DIR.mkdir(exist_ok=True)
|
23 |
|
24 |
-
|
25 |
# ์ ์ญ ๋ณ์๋ก ์คํฌ๋ฆฐ์ท ์บ์ ์ ์ธ
|
26 |
SCREENSHOT_CACHE = {}
|
27 |
-
# get_cached_screenshot ํจ์ ์ถ๊ฐ
|
28 |
|
29 |
def get_cached_screenshot(url: str) -> str:
|
30 |
"""์บ์๋ ์คํฌ๋ฆฐ์ท ๊ฐ์ ธ์ค๊ธฐ ๋๋ ์๋ก ์์ฑ"""
|
|
|
13 |
import gradio as gr
|
14 |
from typing import Tuple
|
15 |
import time
|
16 |
+
from pathlib import Path # ์ถ๊ฐ
|
|
|
|
|
17 |
|
18 |
# ์คํฌ๋ฆฐ์ท ์บ์ ๋๋ ํ ๋ฆฌ ์ค์
|
19 |
CACHE_DIR = Path("screenshot_cache")
|
20 |
CACHE_DIR.mkdir(exist_ok=True)
|
21 |
|
|
|
22 |
# ์ ์ญ ๋ณ์๋ก ์คํฌ๋ฆฐ์ท ์บ์ ์ ์ธ
|
23 |
SCREENSHOT_CACHE = {}
|
|
|
24 |
|
25 |
def get_cached_screenshot(url: str) -> str:
|
26 |
"""์บ์๋ ์คํฌ๋ฆฐ์ท ๊ฐ์ ธ์ค๊ธฐ ๋๋ ์๋ก ์์ฑ"""
|