openfree commited on
Commit
0d75f36
โ€ข
1 Parent(s): c09b1cf

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -12,13 +12,15 @@ from io import BytesIO
12
  from datetime import datetime
13
  import gradio as gr
14
  from typing import Tuple
15
- from pathlib import Path
16
 
17
  # ์Šคํฌ๋ฆฐ์ƒท ์บ์‹œ ๋””๋ ‰ํ† ๋ฆฌ ์„ค์ •
18
  CACHE_DIR = Path("screenshot_cache")
19
  CACHE_DIR.mkdir(exist_ok=True)
20
 
21
- import time # time.sleep() ์‚ฌ์šฉ์„ ์œ„ํ•ด ์ถ”๊ฐ€
 
 
22
 
23
  def take_screenshot(url):
24
  """์›น์‚ฌ์ดํŠธ ์Šคํฌ๋ฆฐ์ƒท ์ดฌ์˜ ํ•จ์ˆ˜ (๋กœ๋”ฉ ๋Œ€๊ธฐ ์‹œ๊ฐ„ ์ถ”๊ฐ€)"""
 
12
  from datetime import datetime
13
  import gradio as gr
14
  from typing import Tuple
15
+ import time
16
 
17
  # ์Šคํฌ๋ฆฐ์ƒท ์บ์‹œ ๋””๋ ‰ํ† ๋ฆฌ ์„ค์ •
18
  CACHE_DIR = Path("screenshot_cache")
19
  CACHE_DIR.mkdir(exist_ok=True)
20
 
21
+
22
+ # ์ „์—ญ ๋ณ€์ˆ˜๋กœ ์Šคํฌ๋ฆฐ์ƒท ์บ์‹œ ์„ ์–ธ
23
+ SCREENSHOT_CACHE = {}
24
 
25
  def take_screenshot(url):
26
  """์›น์‚ฌ์ดํŠธ ์Šคํฌ๋ฆฐ์ƒท ์ดฌ์˜ ํ•จ์ˆ˜ (๋กœ๋”ฉ ๋Œ€๊ธฐ ์‹œ๊ฐ„ ์ถ”๊ฐ€)"""