Skip to content

Commit 91c7659

Browse files
Merge pull request #4201 from aliencaocao/fix_nowebui_arg
Fix nowebui arg being ignored
2 parents 9b2ca18 + 688aa2c commit 91c7659

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

launch.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -238,12 +238,15 @@ def tests(argv):
238238
proc.kill()
239239

240240

241-
def start_webui():
242-
print(f"Launching Web UI with arguments: {' '.join(sys.argv[1:])}")
241+
def start():
242+
print(f"Launching {'API server' if '--nowebui' in sys.argv else 'Web UI'} with arguments: {' '.join(sys.argv[1:])}")
243243
import webui
244-
webui.webui()
244+
if '--nowebui' in sys.argv:
245+
webui.api_only()
246+
else:
247+
webui.webui()
245248

246249

247250
if __name__ == "__main__":
248251
prepare_enviroment()
249-
start_webui()
252+
start()

0 commit comments

Comments
 (0)