From 7592104dbce409b14547d8b37ceda678c062753b Mon Sep 17 00:00:00 2001 From: 006861 Date: Mon, 15 Jul 2024 23:32:52 +0800 Subject: [PATCH] webdemo openxlab --- web_internlm2_5.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/web_internlm2_5.py b/web_internlm2_5.py index 64dbd57..0fc39cf 100644 --- a/web_internlm2_5.py +++ b/web_internlm2_5.py @@ -15,7 +15,7 @@ Please run with the command `streamlit run path/to/web_demo.py Using `python path/to/web_demo.py` may cause unknown problems. """ # isort: skip_file -import copy +import copy, os import warnings from dataclasses import asdict, dataclass from typing import Callable, List, Optional @@ -31,10 +31,15 @@ from transformers import AutoTokenizer, AutoModelForCausalLM # isort: skip logger = logging.get_logger(__name__) -# local -model_path = '/root/EmoLLM/xtuner_config/hf4' +# # local +# model_path = '/root/EmoLLM/xtuner_config/hf_safe' + # Online downloading will be added later +model_path = './EmoLLM_V3.0' +os.system(f'git clone https://code.openxlab.org.cn/chg0901/EmoLLM_V3.0.git {model_path}') +os.system(f'cd {model_path} && git lfs pull') + @dataclass class GenerationConfig: # this config is used for chat to provide more diversity