From dfd7f74921acb8d3b0a8dd8dd884f21990b78dbf Mon Sep 17 00:00:00 2001 From: Saifeddine ALOUI Date: Fri, 24 Jan 2025 13:50:06 +0100 Subject: [PATCH 1/3] Added serving a web ui Serving webui --- lightrag/api/lightrag_server.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lightrag/api/lightrag_server.py b/lightrag/api/lightrag_server.py index 16f3ae49..c17f103e 100644 --- a/lightrag/api/lightrag_server.py +++ b/lightrag/api/lightrag_server.py @@ -1423,7 +1423,11 @@ def create_app(args): 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") + def main(): args = parse_args() import uvicorn From 811574e6e31d53eab851505ff3433fb25c21418b Mon Sep 17 00:00:00 2001 From: Saifeddine ALOUI Date: Fri, 24 Jan 2025 13:52:03 +0100 Subject: [PATCH 2/3] Create keep.txt --- lightrag/api/static/keep.txt | 1 + 1 file changed, 1 insertion(+) create mode 100644 lightrag/api/static/keep.txt diff --git a/lightrag/api/static/keep.txt b/lightrag/api/static/keep.txt new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/lightrag/api/static/keep.txt @@ -0,0 +1 @@ + From ecc3ab16977e96bd51806a1eee36aa8af593191b Mon Sep 17 00:00:00 2001 From: Saifeddine ALOUI Date: Fri, 24 Jan 2025 13:52:26 +0100 Subject: [PATCH 3/3] Create index.html --- lightrag/api/static/index.html | 106 +++++++++++++++++++++++++++++++++ 1 file changed, 106 insertions(+) create mode 100644 lightrag/api/static/index.html diff --git a/lightrag/api/static/index.html b/lightrag/api/static/index.html new file mode 100644 index 00000000..8c352ea6 --- /dev/null +++ b/lightrag/api/static/index.html @@ -0,0 +1,106 @@ + + + + + + RAG WebUI + + + +
+

RAG WebUI

+ + +
+

Upload Files

+
+ + +
+
+
+ + +
+

Query

+
+ + +
+
+
+
+ + + +