Spaces:
Runtime error
Runtime error
Gagan Bhatia commited on
Commit ·
981a6e0
1
Parent(s): 7491802
Update model.py
Browse files- src/models/model.py +1 -0
src/models/model.py
CHANGED
|
@@ -367,6 +367,7 @@ class Summarization:
|
|
| 367 |
elif model_type == "byt5":
|
| 368 |
self.tokenizer = ByT5Tokenizer.from_pretrained(f"{model_dir}")
|
| 369 |
self.model = T5ForConditionalGeneration.from_pretrained(
|
|
|
|
| 370 |
|
| 371 |
if use_gpu:
|
| 372 |
if torch.cuda.is_available():
|
|
|
|
| 367 |
elif model_type == "byt5":
|
| 368 |
self.tokenizer = ByT5Tokenizer.from_pretrained(f"{model_dir}")
|
| 369 |
self.model = T5ForConditionalGeneration.from_pretrained(
|
| 370 |
+
f"{model_dir}", return_dict=True
|
| 371 |
|
| 372 |
if use_gpu:
|
| 373 |
if torch.cuda.is_available():
|