From 9be296b468cad1e37a268eb16702f671aafc6b20 Mon Sep 17 00:00:00 2001 From: cornzz <39997278+cornzz@users.noreply.github.com> Date: Tue, 13 Aug 2024 14:53:39 +0200 Subject: [PATCH] Fix root app path --- src/app.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app.py b/src/app.py index 6c1b302..c21abbe 100644 --- a/src/app.py +++ b/src/app.py @@ -37,7 +37,7 @@ start_load = time.time() load_dotenv() -APP_PATH = os.getenv("APP_PATH") or "/" +APP_PATH = os.getenv("APP_PATH") or "" LLM_ENDPOINT = os.getenv("LLM_ENDPOINT") LLM_TOKEN = os.getenv("LLM_TOKEN") LLM_LIST = [ @@ -363,5 +363,5 @@ def flag(prompt, context, compr_prompt, rate, metrics, res_a_obj, res_b_obj, fla flag_b.click(flag, inputs=FLAG_COMPONENTS + [flag_b], outputs=[flag_a, flag_n, flag_b], preprocess=False) -app = gr.mount_gradio_app(app, demo, path=APP_PATH) +app = gr.mount_gradio_app(app, demo, path=APP_PATH, root_path=APP_PATH) print(f"Ready! Loaded in {time.time() - start_load:.2f}s")