Omnibus commited on
Commit
3c1d120
1 Parent(s): 9d1afe5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -119,7 +119,7 @@ def run_script(url: str, height: int, width: int, check_b,check_h,wait_time):
119
  driver.get(url)
120
  html=driver.page_source
121
  print(html)
122
- driver.implicitly_wait(wait_time)
123
  driver.set_window_size(int(width), int(height))
124
 
125
  screenshot = driver.save_screenshot(f'{uid}-tmp.png')
@@ -150,7 +150,7 @@ with gr.Blocks() as app:
150
  with gr.Column():
151
  inp = gr.Textbox(label="URL (must be Public)",lines=1)
152
  with gr.Row():
153
- wait_t=gr.Slider(30, 50000, value=2000, label="Wait time", info="Wait for page to load. More data = Longer wait")
154
  btn= gr.Button("Snapshot")
155
 
156
  with gr.Column():
 
119
  driver.get(url)
120
  html=driver.page_source
121
  print(html)
122
+ driver.implicitly_wait(int(wait_time*30))
123
  driver.set_window_size(int(width), int(height))
124
 
125
  screenshot = driver.save_screenshot(f'{uid}-tmp.png')
 
150
  with gr.Column():
151
  inp = gr.Textbox(label="URL (must be Public)",lines=1)
152
  with gr.Row():
153
+ wait_t=gr.Slider(1, 10000, value=2000, label="Wait time", info="Wait for page to load. More data = Longer wait")
154
  btn= gr.Button("Snapshot")
155
 
156
  with gr.Column():