Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -16,7 +16,7 @@ num_ftrs = model.classifier[1].in_features
|
|
16 |
model.classifier[1] = nn.Linear(num_ftrs, 6)
|
17 |
device = torch.device('cuda') if torch.cuda.is_available() else torch.device('cpu')
|
18 |
model = model.to(device)
|
19 |
-
model.load_state_dict(torch.load('model_weights_EfficientNetB0_final.pth'))
|
20 |
|
21 |
#torch.hub.download_url_to_file("https://github.com/pytorch/hub/raw/master/images/dog.jpg", "dog.jpg")
|
22 |
|
|
|
16 |
model.classifier[1] = nn.Linear(num_ftrs, 6)
|
17 |
device = torch.device('cuda') if torch.cuda.is_available() else torch.device('cpu')
|
18 |
model = model.to(device)
|
19 |
+
model.load_state_dict(torch.load('model_weights_EfficientNetB0_final.pth',map_location=device))
|
20 |
|
21 |
#torch.hub.download_url_to_file("https://github.com/pytorch/hub/raw/master/images/dog.jpg", "dog.jpg")
|
22 |
|