From c515280c83828ccb54e37c8124ee9554b8492ea1 Mon Sep 17 00:00:00 2001 From: David Date: Sun, 28 Apr 2024 17:50:21 +0100 Subject: [PATCH 1/3] Optional support for local install of marked --- .gitignore | 3 ++- static/package.json | 25 +++++++++++++++++++++++++ templates/index.html | 2 +- 3 files changed, 28 insertions(+), 2 deletions(-) create mode 100644 static/package.json diff --git a/.gitignore b/.gitignore index 8b56a79c..e7e96503 100644 --- a/.gitignore +++ b/.gitignore @@ -5,4 +5,5 @@ build/ __pycache__/ .idea venv -dist \ No newline at end of file +dist +static/node_modules/ diff --git a/static/package.json b/static/package.json new file mode 100644 index 00000000..211e46da --- /dev/null +++ b/static/package.json @@ -0,0 +1,25 @@ +{ + "name": "exui", + "version": "1.0.0", + "description": "

", + "main": "index.js", + "directories": { + "doc": "doc" + }, + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/turboderp/exui.git" + }, + "author": "", + "license": "ISC", + "bugs": { + "url": "https://github.com/turboderp/exui/issues" + }, + "homepage": "https://github.com/turboderp/exui#readme", + "dependencies": { + "marked": "^12.0.2" + } +} diff --git a/templates/index.html b/templates/index.html index 81335103..2672eff4 100644 --- a/templates/index.html +++ b/templates/index.html @@ -18,7 +18,7 @@ {% include 'svg_icons.html' %} - + From cfe71b103ab6032c6f470e63e22005b5ac8550c4 Mon Sep 17 00:00:00 2001 From: David Date: Sun, 28 Apr 2024 18:16:03 +0100 Subject: [PATCH 2/3] Fix fallback logic --- templates/index.html | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/templates/index.html b/templates/index.html index 2672eff4..fc12ce3b 100644 --- a/templates/index.html +++ b/templates/index.html @@ -18,7 +18,10 @@ {% include 'svg_icons.html' %} - + + From f09fb5e6af7f2f85580e0da2e8e3a37e97f1302f Mon Sep 17 00:00:00 2001 From: David Date: Sun, 28 Apr 2024 18:39:17 +0100 Subject: [PATCH 3/3] Added documentation on the local library install --- README.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index d4a7a226..18e2897f 100644 --- a/README.md +++ b/README.md @@ -34,6 +34,13 @@ cd exui pip install -r requirements.txt ``` +Optionally, install javascript modules locally, to enable the UI to run when offline (requires Node and npm to be installed): +``` +cd static +npm install +cd .. +``` + Then run the web server with the included server.py: ``` @@ -43,7 +50,7 @@ python server.py Your browser should automatically open on the default IP/port. Config and sessions are stored in `~/exui` by default. Prebuilt wheels for ExLlamaV2 are available [here](https://github.com/turboderp/exllamav2/releases). Installing -the latest version of [Flash Attention](https://github.com/Dao-AILab/flash-attention) is recommended. +the latest version of [Flash Attention](https://github.com/Dao-AILab/flash-attention) is recommended. ### Running in Google Colab