From 942429c04fec66c3f2bd92e918ac0be527fe737b Mon Sep 17 00:00:00 2001 From: HongCheng Date: Mon, 29 Apr 2024 11:44:06 +0900 Subject: [PATCH] update llama3 webdemo path name --- web_demo_Llama3.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/web_demo_Llama3.py b/web_demo_Llama3.py index 5eae794..5801413 100644 --- a/web_demo_Llama3.py +++ b/web_demo_Llama3.py @@ -151,15 +151,15 @@ def on_btn_click(): @st.cache_resource def load_model(): - model_name = "./EmoLLM-Llama3-8B-Instruct3.0" - print(model_name) + model_name0 = "./EmoLLM-Llama3-8B-Instruct3.0" + print(model_name0) print('pip install modelscope websockets') os.system(f'pip install modelscope websockets==11.0.3') from modelscope import snapshot_download #模型下载 - model_name = snapshot_download('chg0901/EmoLLM-Llama3-8B-Instruct3.0',cache_dir=model_name) + model_name = snapshot_download('chg0901/EmoLLM-Llama3-8B-Instruct3.0',cache_dir=model_name0) print(model_name) model = AutoModelForCausalLM.from_pretrained(model_name, device_map="auto", trust_remote_code=True, torch_dtype=torch.float16).eval()