aboutsummaryrefslogtreecommitdiff
path: root/launch.py
diff options
context:
space:
mode:
authorevshiron <evshiron@gmail.com>2022-11-05 01:43:02 +0800
committerevshiron <evshiron@gmail.com>2022-11-05 01:43:02 +0800
commit73e1cd6f53f3566973805666a4049450cdb8da1b (patch)
tree90c4f0e6b8853c564894409c596e4bd57bca578a /launch.py
parente21fcd72fcf147904a1df060226c4df12acf251e (diff)
parent89722fb5e4eda2adc5d3a6abf8babf8a58e80d69 (diff)
Merge branch 'master' into fix/encode-pnginfo
Diffstat (limited to 'launch.py')
-rw-r--r--launch.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/launch.py b/launch.py
index ff2f74ba..2a51f20e 100644
--- a/launch.py
+++ b/launch.py
@@ -238,12 +238,15 @@ def tests(argv):
proc.kill()
-def start_webui():
- print(f"Launching Web UI with arguments: {' '.join(sys.argv[1:])}")
+def start():
+ print(f"Launching {'API server' if '--nowebui' in sys.argv else 'Web UI'} with arguments: {' '.join(sys.argv[1:])}")
import webui
- webui.webui()
+ if '--nowebui' in sys.argv:
+ webui.api_only()
+ else:
+ webui.webui()
if __name__ == "__main__":
prepare_enviroment()
- start_webui()
+ start()