Update webui.py
Browse files
webui.py
CHANGED
|
@@ -43,7 +43,8 @@ def ngrok_start(ngrokTokenFile: str, port: int, address_name: str, should_run: b
|
|
| 43 |
else:
|
| 44 |
print('skip start ngrok')
|
| 45 |
|
| 46 |
-
|
|
|
|
| 47 |
|
| 48 |
startup_timer = timer.startup_timer
|
| 49 |
startup_timer.record("launcher")
|
|
@@ -191,10 +192,17 @@ def webui():
|
|
| 191 |
initialize.initialize_rest(reload_script_modules=True)
|
| 192 |
|
| 193 |
|
| 194 |
-
|
| 195 |
-
from modules.shared_cmd_options import cmd_opts
|
| 196 |
|
| 197 |
-
|
| 198 |
-
|
| 199 |
-
|
| 200 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 43 |
else:
|
| 44 |
print('skip start ngrok')
|
| 45 |
|
| 46 |
+
if ngrok_use :
|
| 47 |
+
ngrok_start(ngrokTokenFile,7860,'ngrok_url:',ngrok_use)
|
| 48 |
|
| 49 |
startup_timer = timer.startup_timer
|
| 50 |
startup_timer.record("launcher")
|
|
|
|
| 192 |
initialize.initialize_rest(reload_script_modules=True)
|
| 193 |
|
| 194 |
|
| 195 |
+
from modules.shared_cmd_options import cmd_opts
|
|
|
|
| 196 |
|
| 197 |
+
if cmd_opts.nowebui:
|
| 198 |
+
api_only()
|
| 199 |
+
else:
|
| 200 |
+
webui()
|
| 201 |
+
|
| 202 |
+
#if __name__ == "__main__":
|
| 203 |
+
# from modules.shared_cmd_options import cmd_opts#
|
| 204 |
+
|
| 205 |
+
# if cmd_opts.nowebui:
|
| 206 |
+
# api_only()
|
| 207 |
+
# else:
|
| 208 |
+
# webui()
|