This commit is contained in:
Ali Abid 2021-02-24 12:22:09 -08:00
commit d4bc088910
2 changed files with 6 additions and 5 deletions

View File

@ -400,10 +400,11 @@ class Interface:
is_colab = utils.colab_check()
if is_colab or not(networking.url_ok(path_to_local_server)):
share = True
if debug:
print(strings.en["COLAB_DEBUG_TRUE"])
else:
print(strings.en["COLAB_DEBUG_FALSE"])
if is_colab:
if debug:
print(strings.en["COLAB_DEBUG_TRUE"])
else:
print(strings.en["COLAB_DEBUG_FALSE"])
else:
print(strings.en["RUNNING_LOCALLY"].format(path_to_local_server))

View File

@ -321,6 +321,6 @@ def setup_tunnel(local_server_port):
def url_ok(url):
try:
r = requests.head(url)
return r.status_code == 200 or r.status_code == 401
return r.status_code == 200
except (ConnectionError, requests.exceptions.ConnectionError):
return False