Update app.py
Browse files
app.py
CHANGED
@@ -10,7 +10,7 @@ def load_model():
|
|
10 |
output_attentions = False,
|
11 |
output_hidden_states = False
|
12 |
)
|
13 |
-
model_finetuned.load_state_dict(torch.load('ErnieModel_imdb.pt', map_location
|
14 |
tokenizer = transformers.AutoTokenizer.from_pretrained("nghuyong/ernie-2.0-base-en")
|
15 |
return model_finetuned, tokenizer
|
16 |
|
|
|
10 |
output_attentions = False,
|
11 |
output_hidden_states = False
|
12 |
)
|
13 |
+
model_finetuned.load_state_dict(torch.load('ErnieModel_imdb.pt', map_location=torch.device('cpu')))
|
14 |
tokenizer = transformers.AutoTokenizer.from_pretrained("nghuyong/ernie-2.0-base-en")
|
15 |
return model_finetuned, tokenizer
|
16 |
|