fix: Set root UI path when behind proxy (#38)

Signed-off-by: Guillaume Moutier <3944034+guimou@users.noreply.github.com>
Signed-off-by: Michele Dolfi <dol@zurich.ibm.com>
Co-authored-by: Guillaume Moutier <3944034+guimou@users.noreply.github.com>
Co-authored-by: Michele Dolfi <dol@zurich.ibm.com>
This commit is contained in:
Guillaume Moutier
2025-02-19 04:32:43 -05:00
committed by GitHub
parent ae3b4906f1
commit c64a450bf9

View File

@@ -116,7 +116,11 @@ if WITH_UI:
tmp_output_dir = Path(tempfile.mkdtemp())
gradio_ui.gradio_output_dir = tmp_output_dir
app = gr.mount_gradio_app(
app, gradio_ui, path="/ui", allowed_paths=["./logo.png", tmp_output_dir]
app,
gradio_ui,
path="/ui",
allowed_paths=["./logo.png", tmp_output_dir],
root_path="/ui",
)