Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -58,7 +58,7 @@ model = BertForSequenceClassification.from_pretrained(
|
|
58 |
output_attentions = False, # Whether the model returns attentions weights.
|
59 |
output_hidden_states = False, # Whether the model returns all hidden-states.
|
60 |
)
|
61 |
-
model.load_state_dict(torch.load("model_last_version.pt"))
|
62 |
# model.to(device)
|
63 |
model.eval()
|
64 |
with torch.no_grad():
|
|
|
58 |
output_attentions = False, # Whether the model returns attentions weights.
|
59 |
output_hidden_states = False, # Whether the model returns all hidden-states.
|
60 |
)
|
61 |
+
model.load_state_dict(torch.load("model_last_version.pt", map_location=torch.device('cpu')))
|
62 |
# model.to(device)
|
63 |
model.eval()
|
64 |
with torch.no_grad():
|