Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -193,7 +193,7 @@ def bart_summarize(text):
|
|
| 193 |
truncation=True,
|
| 194 |
max_length=4096,
|
| 195 |
).to(device)
|
| 196 |
-
|
| 197 |
with torch.no_grad():
|
| 198 |
summary_ids = bart_model.generate(
|
| 199 |
inputs["input_ids"],
|
|
|
|
| 193 |
truncation=True,
|
| 194 |
max_length=4096,
|
| 195 |
).to(device)
|
| 196 |
+
bart_model.config.max_length = 4096
|
| 197 |
with torch.no_grad():
|
| 198 |
summary_ids = bart_model.generate(
|
| 199 |
inputs["input_ids"],
|