kodetr commited on
Commit
71c52b0
·
verified ·
1 Parent(s): 8e1b31f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -52,7 +52,7 @@ def stream_chat(message: str, history: list, temperature: float, max_new_tokens:
52
  print(f"Conversation is -\n{conversation}")
53
 
54
  input_ids = tokenizer.apply_chat_template(conversation, tokenize=False, add_generation_prompt=True)
55
- inputs = tokenizer(input_ids, return_tensors="pt").to(0) #gpu 0, cpu 1
56
 
57
  streamer = TextIteratorStreamer(tokenizer, timeout=60., skip_prompt=True, skip_special_tokens=True)
58
 
 
52
  print(f"Conversation is -\n{conversation}")
53
 
54
  input_ids = tokenizer.apply_chat_template(conversation, tokenize=False, add_generation_prompt=True)
55
+ inputs = tokenizer(input_ids, return_tensors="pt").to('cpu') #gpu 0, cpu 1
56
 
57
  streamer = TextIteratorStreamer(tokenizer, timeout=60., skip_prompt=True, skip_special_tokens=True)
58