From 094074f9c1c74f493a16d0f980ae653eac72b93c Mon Sep 17 00:00:00 2001 From: gluttony-10 <52977964+gluttony-10@users.noreply.github.com> Date: Wed, 11 Sep 2024 09:54:18 +0800 Subject: [PATCH 1/3] Update demo.py Add MODEL_PATH. --- demo.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/demo.py b/demo.py index 18aabcc..6692c77 100644 --- a/demo.py +++ b/demo.py @@ -10,9 +10,11 @@ st.title("LongCite Demo") use_vllm = False # set True to use vllm for inference +MODEL_PATH = os.environ.get("MODEL_PATH", "THUDM/LongCite-glm4-9b") + @st.cache_resource def load_model(): - model_path = "THUDM/LongCite-glm4-9b" + model_path = MODEL_PATH if use_vllm: from vllm_inference import LongCiteModel model = LongCiteModel( From 752c87a338301bc39dc64ad61c97598cd1b3beb3 Mon Sep 17 00:00:00 2001 From: gluttony-10 <52977964+gluttony-10@users.noreply.github.com> Date: Wed, 11 Sep 2024 09:55:30 +0800 Subject: [PATCH 2/3] Update requirement.txt --- requirement.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/requirement.txt b/requirement.txt index d048e5d..85f09c0 100644 --- a/requirement.txt +++ b/requirement.txt @@ -3,4 +3,7 @@ nltk==3.8.1 streamlit==1.38.0 PyPDF2==3.0.1 python-docx==1.1.0 -st-click-detector==0.1.3 \ No newline at end of file +st-click-detector==0.1.3 +torch +tiktoken +accelerate From f4d55890fe32431a5a795a9a320210da4291b75c Mon Sep 17 00:00:00 2001 From: gluttony-10 <52977964+gluttony-10@users.noreply.github.com> Date: Wed, 11 Sep 2024 10:26:03 +0800 Subject: [PATCH 3/3] Rename requirement.txt to requirements.txt --- requirement.txt => requirements.txt | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename requirement.txt => requirements.txt (100%) diff --git a/requirement.txt b/requirements.txt similarity index 100% rename from requirement.txt rename to requirements.txt