SatAT commited on
Commit
a348a05
·
1 Parent(s): a557725

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
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():