jjsprockel commited on
Commit
586ebd8
1 Parent(s): d2c1087

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -2
app.py CHANGED
@@ -32,8 +32,7 @@ def predict(message, history):
32
  messages = "".join(["".join(["\n<human>:"+item[0], "\n<bot>:"+item[1]])
33
  for item in history_transformer_format])
34
 
35
- model_inputs = tokenizer([messages], return_tensors="pt")
36
- #.to("cuda")
37
  streamer = TextIteratorStreamer(tokenizer, timeout=10., skip_prompt=True, skip_special_tokens=True)
38
  generate_kwargs = dict(
39
  model_inputs,
 
32
  messages = "".join(["".join(["\n<human>:"+item[0], "\n<bot>:"+item[1]])
33
  for item in history_transformer_format])
34
 
35
+ model_inputs = tokenizer([messages], return_tensors="pt").to("cuda")
 
36
  streamer = TextIteratorStreamer(tokenizer, timeout=10., skip_prompt=True, skip_special_tokens=True)
37
  generate_kwargs = dict(
38
  model_inputs,