Junlinh commited on
Commit
1d97346
·
1 Parent(s): 750002d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -15,10 +15,9 @@ def predict(input_img):
15
  drop_rate=0.5,
16
  num_classes=1,)
17
 
18
- loc = 'cuda:{}'.format(0)
19
- checkpoint1 = torch.load("./machine_full_best.tar", map_location=loc)
20
  model1.load_state_dict(checkpoint1['state_dict'])
21
- checkpoint2 = torch.load("./human_full_best.tar", map_location=loc)
22
  model2.load_state_dict(checkpoint2['state_dict'])
23
 
24
  my_transform = transforms.Compose([
 
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([