Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -15,7 +15,7 @@ def chat(message, history):
|
|
| 15 |
|
| 16 |
# Generate a response
|
| 17 |
with torch.no_grad():
|
| 18 |
-
outputs = model.generate(inputs.input_ids, max_length=
|
| 19 |
response = tokenizer.decode(outputs[0], skip_special_tokens=True)
|
| 20 |
|
| 21 |
# Extract only the new response part
|
|
|
|
| 15 |
|
| 16 |
# Generate a response
|
| 17 |
with torch.no_grad():
|
| 18 |
+
outputs = model.generate(inputs.input_ids, max_length=300, num_return_sequences=1)
|
| 19 |
response = tokenizer.decode(outputs[0], skip_special_tokens=True)
|
| 20 |
|
| 21 |
# Extract only the new response part
|