Remove bfloat16 in web demo

This commit is contained in:
duzx16 2023-06-25 17:35:08 +08:00
parent c410768fae
commit 6fed3d4dc2

View File

@ -3,7 +3,7 @@ import gradio as gr
import mdtex2html
tokenizer = AutoTokenizer.from_pretrained("THUDM/chatglm2-6b", trust_remote_code=True)
model = AutoModel.from_pretrained("THUDM/chatglm2-6b", trust_remote_code=True, device='cuda').bfloat16()
model = AutoModel.from_pretrained("THUDM/chatglm2-6b", trust_remote_code=True, device='cuda')
model = model.eval()
"""Override Chatbot.postprocess"""