Spaces:
Running
Running
Update app.py
Browse files
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=
|
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
|