PedroMartelleto commited on
Commit
87fbe80
1 Parent(s): 56146b3

small fixes

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -68,7 +68,7 @@ def create_model_from_checkpoint():
68
  # Loads a model from a checkpoint
69
  model = resnet50()
70
  model.fc = nn.Linear(model.fc.in_features, 3)
71
- model.load_state_dict(torch.load("best_model"))
72
  model.eval()
73
  return model
74
 
 
68
  # Loads a model from a checkpoint
69
  model = resnet50()
70
  model.fc = nn.Linear(model.fc.in_features, 3)
71
+ model.load_state_dict(torch.load("best_model", map_location=torch.device('cpu')))
72
  model.eval()
73
  return model
74