Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -63,6 +63,8 @@ def stream_chat(
|
|
63 |
|
64 |
conversation.append({"role": "user", "content": message})
|
65 |
|
|
|
|
|
66 |
input_text=tokenizer.apply_chat_template(conversation, tokenize=False)
|
67 |
inputs = tokenizer.encode(input_text, return_tensors="pt").to(device)
|
68 |
streamer = TextIteratorStreamer(tokenizer, timeout=60.0, skip_prompt=True, skip_special_tokens=True)
|
@@ -76,7 +78,7 @@ def stream_chat(
|
|
76 |
temperature = temperature,
|
77 |
streamer=streamer,
|
78 |
pad_token_id = 0,
|
79 |
-
eos_token_id =
|
80 |
)
|
81 |
|
82 |
with torch.no_grad():
|
|
|
63 |
|
64 |
conversation.append({"role": "user", "content": message})
|
65 |
|
66 |
+
print(conversation)
|
67 |
+
|
68 |
input_text=tokenizer.apply_chat_template(conversation, tokenize=False)
|
69 |
inputs = tokenizer.encode(input_text, return_tensors="pt").to(device)
|
70 |
streamer = TextIteratorStreamer(tokenizer, timeout=60.0, skip_prompt=True, skip_special_tokens=True)
|
|
|
78 |
temperature = temperature,
|
79 |
streamer=streamer,
|
80 |
pad_token_id = 0,
|
81 |
+
eos_token_id = 361 # 361
|
82 |
)
|
83 |
|
84 |
with torch.no_grad():
|