Spaces:
Sleeping
Sleeping
Commit
•
ee175b7
1
Parent(s):
c922790
Update app.py
Browse files
app.py
CHANGED
@@ -21,7 +21,7 @@ examples = [[os.path.join(examples_dir, img), 0.5] for img in os.listdir(example
|
|
21 |
|
22 |
|
23 |
model = CustomResNet()
|
24 |
-
model.load_state_dict(torch.load('modelp.ckpt'
|
25 |
# model = model.cpu()
|
26 |
|
27 |
classes = ['plane', 'car', 'bird', 'cat', 'deer', 'dog', 'frog', 'horse', 'ship', 'truck']
|
|
|
21 |
|
22 |
|
23 |
model = CustomResNet()
|
24 |
+
model.load_state_dict(torch.load('modelp.ckpt', map_location='cpu')['state_dict']) #, strict = False)
|
25 |
# model = model.cpu()
|
26 |
|
27 |
classes = ['plane', 'car', 'bird', 'cat', 'deer', 'dog', 'frog', 'horse', 'ship', 'truck']
|