vilarin commited on
Commit
edbc5cb
1 Parent(s): 22d8950

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -78,7 +78,7 @@ def stream_chat(
78
  tokenizer = tokenizer2
79
 
80
  input_text=tokenizer.apply_chat_template(conversation, tokenize=False)
81
- inputs = tokenizer.encode(input_text, return_tensors="pt").to(device)
82
  streamer = TextIteratorStreamer(tokenizer, timeout=60.0, skip_prompt=True, skip_special_tokens=True)
83
 
84
  generate_kwargs = dict(
 
78
  tokenizer = tokenizer2
79
 
80
  input_text=tokenizer.apply_chat_template(conversation, tokenize=False)
81
+ inputs = tokenizer.encode(input_text, add_generation_prompt=True, return_tensors="pt").to(device)
82
  streamer = TextIteratorStreamer(tokenizer, timeout=60.0, skip_prompt=True, skip_special_tokens=True)
83
 
84
  generate_kwargs = dict(