Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
|
@@ -36,7 +36,8 @@ if st.button("Send"):
|
|
| 36 |
if prompt.strip():
|
| 37 |
st.session_state.history.append(("You", prompt))
|
| 38 |
|
| 39 |
-
|
|
|
|
| 40 |
|
| 41 |
with torch.no_grad():
|
| 42 |
output = model.generate(
|
|
|
|
| 36 |
if prompt.strip():
|
| 37 |
st.session_state.history.append(("You", prompt))
|
| 38 |
|
| 39 |
+
chat = [{"role": "user", "content": prompt}]
|
| 40 |
+
inputs = tokenizer.apply_chat_template(chat, add_generation_prompt=True, return_tensors="pt")
|
| 41 |
|
| 42 |
with torch.no_grad():
|
| 43 |
output = model.generate(
|