Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -39,7 +39,7 @@ if user_input:
|
|
39 |
output = model.generate(**inputs, max_length=200, do_sample=True, top_k=50, top_p=0.95)
|
40 |
|
41 |
# Decode response
|
42 |
-
response = tokenizer.decode(output[:, inputs
|
43 |
|
44 |
# Store and display chat history
|
45 |
st.session_state.chat_history.append(("You", user_input))
|
|
|
39 |
output = model.generate(**inputs, max_length=200, do_sample=True, top_k=50, top_p=0.95)
|
40 |
|
41 |
# Decode response
|
42 |
+
response = tokenizer.decode(output[:, inputs["input_ids"].shape[-1]:][0], skip_special_tokens=True)
|
43 |
|
44 |
# Store and display chat history
|
45 |
st.session_state.chat_history.append(("You", user_input))
|