Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -24,7 +24,7 @@ def inference_mask1(
|
|
| 24 |
model = DCAMA('resnet50', 'resnet50_a1h-35c100f8.pth', True)
|
| 25 |
model.eval()
|
| 26 |
model.cpu()
|
| 27 |
-
state_dict = torch.load('model_45.pt')
|
| 28 |
if 'state_dict' in state_dict.keys():
|
| 29 |
state_dict = state_dict['state_dict']
|
| 30 |
state_dict2 = {}
|
|
|
|
| 24 |
model = DCAMA('resnet50', 'resnet50_a1h-35c100f8.pth', True)
|
| 25 |
model.eval()
|
| 26 |
model.cpu()
|
| 27 |
+
state_dict = torch.load('model_45.pt', map_location=torch.device('cpu'))
|
| 28 |
if 'state_dict' in state_dict.keys():
|
| 29 |
state_dict = state_dict['state_dict']
|
| 30 |
state_dict2 = {}
|