Update app_http.py
Browse files- app_http.py +2 -2
app_http.py
CHANGED
@@ -16,8 +16,8 @@ app = Flask(__name__)
|
|
16 |
CORS(app)
|
17 |
|
18 |
# 加载百川大模型的分词器和模型
|
19 |
-
tokenizer = AutoTokenizer.from_pretrained("baichuan-inc/
|
20 |
-
model = AutoModelForCausalLM.from_pretrained("baichuan-inc/
|
21 |
|
22 |
# 创建线程锁和计数器
|
23 |
lock = threading.Lock()
|
|
|
16 |
CORS(app)
|
17 |
|
18 |
# 加载百川大模型的分词器和模型
|
19 |
+
tokenizer = AutoTokenizer.from_pretrained("baichuan-inc/Baichuan-13B-Chat", trust_remote_code=True)
|
20 |
+
model = AutoModelForCausalLM.from_pretrained("baichuan-inc/Baichuan-13B-Chat", device_map="auto", trust_remote_code=True)
|
21 |
|
22 |
# 创建线程锁和计数器
|
23 |
lock = threading.Lock()
|