arxivgpt kim commited on
Commit
48c160e
·
verified ·
1 Parent(s): 026fdea

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -10,9 +10,10 @@ def take_screenshot(url):
10
  options.add_argument('--no-sandbox')
11
  options.add_argument('--disable-dev-shm-usage')
12
 
 
13
  try:
14
  wd = webdriver.Chrome(options=options)
15
- wd.set_window_size(1024, 768) # Adjust the window size here
16
  wd.get(url)
17
  wd.implicitly_wait(10)
18
  screenshot = wd.get_screenshot_as_png()
@@ -27,7 +28,7 @@ def take_screenshot(url):
27
  iface = gr.Interface(
28
  fn=take_screenshot,
29
  inputs=gr.inputs.Textbox(label="Website URL", default="https://korating.com"),
30
- outputs=gr.Image(type="pil", height=360, width=540), # Adjust the image size here
31
  title="Website Screenshot",
32
  description="Take a screenshot of a website.",
33
  )
 
10
  options.add_argument('--no-sandbox')
11
  options.add_argument('--disable-dev-shm-usage')
12
 
13
+ wd = None
14
  try:
15
  wd = webdriver.Chrome(options=options)
16
+ wd.set_window_size(1920, 1080) # 조정된 윈도우 크기
17
  wd.get(url)
18
  wd.implicitly_wait(10)
19
  screenshot = wd.get_screenshot_as_png()
 
28
  iface = gr.Interface(
29
  fn=take_screenshot,
30
  inputs=gr.inputs.Textbox(label="Website URL", default="https://korating.com"),
31
+ outputs=gr.Image(type="pil", height=540, width=960), # 조정된 이미지 크기
32
  title="Website Screenshot",
33
  description="Take a screenshot of a website.",
34
  )