glt3953 commited on
Commit
2795a1e
·
1 Parent(s): 13e2d1f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -4,8 +4,8 @@ from transformers import AutoTokenizer, AutoModel
4
  import gradio as gr
5
 
6
  tokenizer = AutoTokenizer.from_pretrained("THUDM/chatglm2-6b", trust_remote_code=True)
7
- model = AutoModel.from_pretrained("THUDM/chatglm2-6b", trust_remote_code=True, device='cuda')
8
- # model = AutoModel.from_pretrained("THUDM/chatglm2-6b", trust_remote_code=True).float()
9
  # model = AutoModel.from_pretrained("THUDM/chatglm2-6b-int4",trust_remote_code=True).float()
10
  model = model.eval()
11
 
 
4
  import gradio as gr
5
 
6
  tokenizer = AutoTokenizer.from_pretrained("THUDM/chatglm2-6b", trust_remote_code=True)
7
+ # model = AutoModel.from_pretrained("THUDM/chatglm2-6b", trust_remote_code=True, device='cuda')
8
+ model = AutoModel.from_pretrained("THUDM/chatglm2-6b", trust_remote_code=True).float()
9
  # model = AutoModel.from_pretrained("THUDM/chatglm2-6b-int4",trust_remote_code=True).float()
10
  model = model.eval()
11