ttoosi commited on
Commit
b47a80f
·
1 Parent(s): 741020d
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -10,7 +10,7 @@ checkpoint_path = hf_hub_download(repo_id="ttoosi/resnet50_robust_face", filenam
10
 
11
  # Initialize the model
12
  model = models.resnet50()
13
- model.load_state_dict(torch.load(checkpoint_path, map_location=torch.device('cpu'))) # Force model to load on CPU
14
  model.eval()
15
 
16
  # Image preprocessing
 
10
 
11
  # Initialize the model
12
  model = models.resnet50()
13
+ model.load_state_dict(torch.load(checkpoint_path, map_location=torch.device('cpu'))['model']) # Force model to load on CPU
14
  model.eval()
15
 
16
  # Image preprocessing