Spaces:
Runtime error
Runtime error
change the model
Browse files
app.py
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
import torch
|
2 |
-
from transformers import
|
3 |
|
4 |
-
|
5 |
torch_device = 'cuda' if torch.cuda.is_available() else 'cpu'
|
6 |
tokenizer = PegasusTokenizer.from_pretrained(model_name)
|
7 |
model = PegasusForConditionalGeneration.from_pretrained(model_name).to(torch_device)
|
|
|
1 |
import torch
|
2 |
+
from transformers import BertForMaskedLM
|
3 |
|
4 |
+
model = BertForMaskedLM.from_pretrained("remi/bertabs-finetuned-extractive-abstractive-summarization")
|
5 |
torch_device = 'cuda' if torch.cuda.is_available() else 'cpu'
|
6 |
tokenizer = PegasusTokenizer.from_pretrained(model_name)
|
7 |
model = PegasusForConditionalGeneration.from_pretrained(model_name).to(torch_device)
|