zR commited on
Commit
1c7517e
1 Parent(s): d111905
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -3,7 +3,7 @@ import gradio as gr
3
  from transformers import AutoTokenizer, AutoModelForCausalLM, TextIteratorStreamer
4
  import spaces
5
  tokenizer = AutoTokenizer.from_pretrained("THUDM/glm-edge-1.5b-chat")
6
- model = AutoModelForCausalLM.from_pretrained("THUDM/glm-edge-1.5b-chat", device='auto')
7
 
8
 
9
  def preprocess_messages(history):
 
3
  from transformers import AutoTokenizer, AutoModelForCausalLM, TextIteratorStreamer
4
  import spaces
5
  tokenizer = AutoTokenizer.from_pretrained("THUDM/glm-edge-1.5b-chat")
6
+ model = AutoModelForCausalLM.from_pretrained("THUDM/glm-edge-1.5b-chat", device_map='auto')
7
 
8
 
9
  def preprocess_messages(history):