mirror of https://github.com/THUDM/ChatGLM-6B
Update web_demo.py
parent
fe48cdec6a
commit
a2f8bec32b
|
@ -2,8 +2,7 @@ from transformers import AutoModel, AutoTokenizer
|
|||
import gradio as gr
|
||||
|
||||
tokenizer = AutoTokenizer.from_pretrained("THUDM/chatglm-6b", trust_remote_code=True)
|
||||
model = AutoModel.from_pretrained("THUDM/chatglm-6b", trust_remote_code=True)
|
||||
model = model.half().cuda()
|
||||
model = AutoModel.from_pretrained("THUDM/chatglm-6b", trust_remote_code=True).half().cuda()
|
||||
model = model.eval()
|
||||
|
||||
MAX_TURNS = 20
|
||||
|
|
Loading…
Reference in New Issue