From b2f6e0704e178f64881f507f3a48ff36e63e1a62 Mon Sep 17 00:00:00 2001 From: catalpaaa Date: Tue, 25 Apr 2023 07:27:24 -0700 Subject: add subpath support --- webui.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'webui.py') diff --git a/webui.py b/webui.py index b570895f..d8997819 100644 --- a/webui.py +++ b/webui.py @@ -290,6 +290,11 @@ def webui(): print(f"Startup time: {startup_timer.summary()}.") + if cmd_opts.subpath: + redirector = FastAPI() + redirector.get("/") + mounted_app = gradio.mount_gradio_app(redirector, shared.demo, path=f"/{cmd_opts.subpath}") + wait_on_server(shared.demo) print('Restarting UI...') -- cgit v1.2.3