Junlinh commited on
Commit
edaab33
1 Parent(s): 1d97346

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -15,9 +15,9 @@ def predict(input_img):
15
  drop_rate=0.5,
16
  num_classes=1,)
17
 
18
- checkpoint1 = torch.load("./machine_full_best.tar")
19
  model1.load_state_dict(checkpoint1['state_dict'])
20
- checkpoint2 = torch.load("./human_full_best.tar")
21
  model2.load_state_dict(checkpoint2['state_dict'])
22
 
23
  my_transform = transforms.Compose([
 
15
  drop_rate=0.5,
16
  num_classes=1,)
17
 
18
+ checkpoint1 = torch.load("./machine_full_best.tar",map_location=torch.device('cpu'))
19
  model1.load_state_dict(checkpoint1['state_dict'])
20
+ checkpoint2 = torch.load("./human_full_best.tar",map_location=torch.device('cpu'))
21
  model2.load_state_dict(checkpoint2['state_dict'])
22
 
23
  my_transform = transforms.Compose([