leuschnm commited on
Commit
9254d1a
·
1 Parent(s): 18a2e37

add cpu load

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -67,7 +67,7 @@ def predict(img):
67
  #model = SASNet().cuda()
68
  model_path = "./SHHA.pth"
69
  # load the trained model
70
- model.load_state_dict(torch.load(model_path))
71
  print('successfully load model from', model_path)
72
 
73
  with torch.no_grad():
 
67
  #model = SASNet().cuda()
68
  model_path = "./SHHA.pth"
69
  # load the trained model
70
+ model.load_state_dict(torch.load(model_path, map_location=torch.device('cpu')))
71
  print('successfully load model from', model_path)
72
 
73
  with torch.no_grad():