Update app.py
Browse files
app.py
CHANGED
@@ -65,7 +65,7 @@ def stream_chat(message: str, history: list, temperature: float, max_new_tokens:
|
|
65 |
|
66 |
conversation.append({"role": "user", "content": message})
|
67 |
|
68 |
-
input_ids = tokenizer.apply_chat_template(
|
69 |
|
70 |
gen_tokens= model.generate(
|
71 |
input_ids,
|
|
|
65 |
|
66 |
conversation.append({"role": "user", "content": message})
|
67 |
|
68 |
+
input_ids = tokenizer.apply_chat_template(conversation, tokenize=True, add_generation_prompt=True, return_tensors="pt").to(model.device)
|
69 |
|
70 |
gen_tokens= model.generate(
|
71 |
input_ids,
|