Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -90,7 +90,7 @@ def run_script(url: str, height: int, width: int, check_b,check_h):
|
|
| 90 |
out = f'comb-{uid}-tmp.png'
|
| 91 |
screenshot = obj.screenshot(f'{uid}-tmp.png')
|
| 92 |
except WebDriverException as e:
|
| 93 |
-
return Image.new('RGB', (1, 1)), f'<center>
|
| 94 |
finally:
|
| 95 |
if driver:
|
| 96 |
driver.quit()
|
|
@@ -119,4 +119,4 @@ with gr.Blocks() as app:
|
|
| 119 |
outim = gr.Image()
|
| 120 |
|
| 121 |
btn.click(run_script,[inp,height,width,check_b,check_h],[outim,message,outgal,out])
|
| 122 |
-
app.launch()
|
|
|
|
| 90 |
out = f'comb-{uid}-tmp.png'
|
| 91 |
screenshot = obj.screenshot(f'{uid}-tmp.png')
|
| 92 |
except WebDriverException as e:
|
| 93 |
+
return Image.new('RGB', (1, 1)), f'<center>Please enter a valid URL of a website/host.',out_box,out
|
| 94 |
finally:
|
| 95 |
if driver:
|
| 96 |
driver.quit()
|
|
|
|
| 119 |
outim = gr.Image()
|
| 120 |
|
| 121 |
btn.click(run_script,[inp,height,width,check_b,check_h],[outim,message,outgal,out])
|
| 122 |
+
app.queue(default_concurrency_limit=5).launch()
|