Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -77,8 +77,7 @@ def stream_chat(
|
|
77 |
conversation.append({"role": "user", "content": message})
|
78 |
|
79 |
|
80 |
-
input_text = tokenizer.apply_chat_template(conversation, tokenize=False)
|
81 |
-
input_text += "<|im_start|>assistant\n"
|
82 |
|
83 |
inputs = tokenizer.encode(input_text, return_tensors="pt").to(device)
|
84 |
streamer = TextIteratorStreamer(tokenizer, timeout=60.0, skip_prompt=True, skip_special_tokens=True)
|
|
|
77 |
conversation.append({"role": "user", "content": message})
|
78 |
|
79 |
|
80 |
+
input_text = tokenizer.apply_chat_template(conversation, tokenize=False, add_generation_prompt = True)
|
|
|
81 |
|
82 |
inputs = tokenizer.encode(input_text, return_tensors="pt").to(device)
|
83 |
streamer = TextIteratorStreamer(tokenizer, timeout=60.0, skip_prompt=True, skip_special_tokens=True)
|