Spaces:
Runtime error
Runtime error
MeetJivani
commited on
Commit
·
9ebcabc
1
Parent(s):
01ce424
Update summarize.py
Browse files- summarize.py +5 -5
summarize.py
CHANGED
@@ -21,11 +21,11 @@ def load_model_and_tokenizer(model_name: str) -> tuple:
|
|
21 |
:return tuple: a tuple containing the model and tokenizer
|
22 |
"""
|
23 |
MODEL_OPTIONS = {
|
24 |
-
"Text
|
25 |
-
"News Artical
|
26 |
-
"News Artical
|
27 |
-
"Scientific Document
|
28 |
-
"Scientific Document
|
29 |
}
|
30 |
selected_model_identifier = MODEL_OPTIONS.get(model_name)
|
31 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
|
|
21 |
:return tuple: a tuple containing the model and tokenizer
|
22 |
"""
|
23 |
MODEL_OPTIONS = {
|
24 |
+
"Text Summarizer": "pszemraj/long-t5-tglobal-base-16384-book-summary",
|
25 |
+
"News Artical Summarizer Alpha": "pszemraj/long-t5-tglobal-base-sci-simplify",
|
26 |
+
"News Artical Summarizer Beta": "pszemraj/long-t5-tglobal-base-sci-simplify-elife",
|
27 |
+
"Scientific Document Summarizer Alpha": "pszemraj/long-t5-tglobal-base-16384-booksci-summary-v1",
|
28 |
+
"Scientific Document Summarizer Beta": "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"
|