Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -10,7 +10,7 @@ hf_token = os.getenv("HF_API_TOKEN")
|
|
10 |
base_model_name = "larry1129/WooWoof_AI_Vision_merged_16bit_3b"
|
11 |
|
12 |
# 定义 adapter 模型名称
|
13 |
-
|
14 |
|
15 |
# 定义全局变量用于缓存模型和分词器
|
16 |
model = None
|
@@ -77,7 +77,7 @@ def generate_response(instruction, input_text):
|
|
77 |
# 加载适配器模型
|
78 |
model = PeftModel.from_pretrained(
|
79 |
base_model,
|
80 |
-
|
81 |
torch_dtype=torch.float16,
|
82 |
use_auth_token=hf_token
|
83 |
)
|
|
|
10 |
base_model_name = "larry1129/WooWoof_AI_Vision_merged_16bit_3b"
|
11 |
|
12 |
# 定义 adapter 模型名称
|
13 |
+
adapter_model_name = "larry1129/WooWoof_AI_Vision_merged_16bit_3b"
|
14 |
|
15 |
# 定义全局变量用于缓存模型和分词器
|
16 |
model = None
|
|
|
77 |
# 加载适配器模型
|
78 |
model = PeftModel.from_pretrained(
|
79 |
base_model,
|
80 |
+
adapter_model_name,
|
81 |
torch_dtype=torch.float16,
|
82 |
use_auth_token=hf_token
|
83 |
)
|