glt3953 commited on
Commit
84cf670
·
1 Parent(s): f933988

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -5,8 +5,8 @@ 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
 
12
  def text_generation(prompt: str, style: str) -> str:
 
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
 
12
  def text_generation(prompt: str, style: str) -> str: