Spaces:
Runtime error
Runtime error
Commit
·
048132e
1
Parent(s):
5407b63
Update summarize.py
Browse files- summarize.py +1 -1
summarize.py
CHANGED
@@ -27,7 +27,7 @@ def load_model_and_tokenizer(model_name: str) -> tuple:
|
|
27 |
"Model 4": "pszemraj/long-t5-tglobal-base-16384-booksci-summary-v1",
|
28 |
"Model 5": "pszemraj/pegasus-x-large-book-summary",
|
29 |
}
|
30 |
-
selected_model_identifier = MODEL_OPTIONS.get(
|
31 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
32 |
model = AutoModelForSeq2SeqLM.from_pretrained(
|
33 |
selected_model_identifier,
|
|
|
27 |
"Model 4": "pszemraj/long-t5-tglobal-base-16384-booksci-summary-v1",
|
28 |
"Model 5": "pszemraj/pegasus-x-large-book-summary",
|
29 |
}
|
30 |
+
selected_model_identifier = MODEL_OPTIONS.get(model_name)
|
31 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
32 |
model = AutoModelForSeq2SeqLM.from_pretrained(
|
33 |
selected_model_identifier,
|