mirror of
https://github.com/gradio-app/gradio.git
synced 2024-12-27 02:30:17 +08:00
Merge branch 'master' of https://github.com/gradio-app/gradio
This commit is contained in:
commit
c00aad37c0
@ -320,7 +320,10 @@ def setup_tunnel(local_server_port):
|
||||
|
||||
def url_ok(url):
|
||||
try:
|
||||
r = requests.head(url)
|
||||
return r.status_code == 200
|
||||
for _ in range(5):
|
||||
time.sleep(.500)
|
||||
r = requests.head(url)
|
||||
if r.status_code == 200:
|
||||
return True
|
||||
except (ConnectionError, requests.exceptions.ConnectionError):
|
||||
return False
|
||||
|
Loading…
Reference in New Issue
Block a user