Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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(
|