mikeee commited on
Commit
987f644
·
1 Parent(s): 1b67133

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -25,9 +25,9 @@ has_cuda = torch.cuda.is_available()
25
  # has_cuda = False # force cpu
26
 
27
  if has_cuda:
28
- model = AutoModel.from_pretrained(model_name, trust_remote_code=True).cuda() # 3.92
29
  else:
30
- model = AutoModel.from_pretrained(model_name, trust_remote_code=True) # .float()
31
 
32
  model = model.eval()
33
 
@@ -101,7 +101,7 @@ def reset_state():
101
 
102
 
103
  with gr.Blocks() as demo:
104
- gr.HTML("""<h1 align="center">ChatGLM2-6B-4bit</h1>""")
105
 
106
  chatbot = gr.Chatbot()
107
  with gr.Row():
 
25
  # has_cuda = False # force cpu
26
 
27
  if has_cuda:
28
+ model = AutoModel.from_pretrained(model_name, trust_remote_code=True).cuda() # 3.92G
29
  else:
30
+ model = AutoModel.from_pretrained(model_name, trust_remote_code=True).float()
31
 
32
  model = model.eval()
33
 
 
101
 
102
 
103
  with gr.Blocks() as demo:
104
+ gr.HTML("""<h1 align="center">ChatGLM2-6B-int4</h1>""")
105
 
106
  chatbot = gr.Chatbot()
107
  with gr.Row():