aboutsummaryrefslogtreecommitdiff
path: root/modules/ui.py
diff options
context:
space:
mode:
authorJamnedZ <zaguzinegor@gmail.com>2022-10-11 16:40:27 +0700
committerAUTOMATIC1111 <16777216c@gmail.com>2022-10-11 15:38:53 +0300
commit59925644480b6fd84f6bb84b4df7d4fbc6a0cce8 (patch)
tree2470d59fe2fcb319a916333f2a99aee936dd5699 /modules/ui.py
parent4e485b79238666ace2b270045f73a12e5ccc7af9 (diff)
Cleaned ngrok integration
Diffstat (limited to 'modules/ui.py')
-rw-r--r--modules/ui.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/modules/ui.py b/modules/ui.py
index fc0f3d3c..f57f32db 100644
--- a/modules/ui.py
+++ b/modules/ui.py
@@ -51,6 +51,11 @@ if not cmd_opts.share and not cmd_opts.listen:
gradio.utils.version_check = lambda: None
gradio.utils.get_local_ip_address = lambda: '127.0.0.1'
+if cmd_opts.ngrok != None:
+ import modules.ngrok as ngrok
+ print('ngrok authtoken detected, trying to connect...')
+ ngrok.connect(cmd_opts.ngrok, cmd_opts.port if cmd_opts.port != None else 7860)
+
def gr_show(visible=True):
return {"visible": visible, "__type__": "update"}