Spaces:
Build error
Build error
cpu
Browse files
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
|