pvduy commited on
Commit
650a5cd
1 Parent(s): 66fa847

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -30,7 +30,7 @@ def predict(message, history, system_prompt, temperature, max_tokens):
30
  messages.append({'role': 'user', 'content': message})
31
  problem = [tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)]
32
  stop_tokens = ["<|endoftext|>", "<|im_end|>"]
33
- streamer = TextIteratorStreamer(tokenizer, timeout=100.0, skip_prompt=True, skip_special_tokens=True)
34
  enc = tokenizer(problem, return_tensors="pt", padding=True, truncation=True)
35
  input_ids = enc.input_ids
36
  attention_mask = enc.attention_mask
 
30
  messages.append({'role': 'user', 'content': message})
31
  problem = [tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)]
32
  stop_tokens = ["<|endoftext|>", "<|im_end|>"]
33
+ streamer = TextIteratorStreamer(tokenizer, timeout=100.0, skip_prompt=True, skip_special_tokens=False)
34
  enc = tokenizer(problem, return_tensors="pt", padding=True, truncation=True)
35
  input_ids = enc.input_ids
36
  attention_mask = enc.attention_mask