From a0c91d41b91a35745228b4740d4988408643ac94 Mon Sep 17 00:00:00 2001 From: Saifeddine ALOUI Date: Fri, 24 Jan 2025 13:54:49 +0100 Subject: [PATCH] Fixed serving the webui --- lightrag/api/lightrag_server.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lightrag/api/lightrag_server.py b/lightrag/api/lightrag_server.py index 87c607c8..e497e586 100644 --- a/lightrag/api/lightrag_server.py +++ b/lightrag/api/lightrag_server.py @@ -1507,13 +1507,14 @@ def create_app(args): "max_tokens": args.max_tokens, }, } - - return app - + # Serve the static files static_dir = Path(__file__).parent / "static" static_dir.mkdir(exist_ok=True) app.mount("/", StaticFiles(directory=static_dir, html=True), name="static") + + return app + def main(): args = parse_args()