Commit fb137479 authored by Billy Cao's avatar Billy Cao
Browse files

Fix --nowebui argument being ineffective

parent 1a4ff2de
Loading
Loading
Loading
Loading
+7 −4
Original line number Diff line number Diff line
@@ -217,12 +217,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
    if '--nowebui' in sys.argv:
        webui.api_only()
    else:
        webui.webui()


if __name__ == "__main__":
    prepare_enviroment()
    start_webui()
    start()