Merge pull request #9865 from catalpaaa/subpath-support

add subpath support
This commit is contained in:
AUTOMATIC1111
2023-05-02 11:01:27 +03:00
committed by GitHub
3 changed files with 6 additions and 0 deletions

View File

@@ -344,6 +344,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...')