Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -10,7 +10,7 @@ model = EfficientNet.from_name('efficientnet-b0')
|
|
10 |
|
11 |
in_features = model._fc.in_features
|
12 |
model._fc = torch.nn.Linear(in_features, 2)
|
13 |
-
model.load_state_dict(torch.load('model_transfer.pt'))
|
14 |
|
15 |
model.to(device)
|
16 |
|
|
|
10 |
|
11 |
in_features = model._fc.in_features
|
12 |
model._fc = torch.nn.Linear(in_features, 2)
|
13 |
+
model.load_state_dict(torch.load('model_transfer.pt', map_location=torch.device('cpu')))
|
14 |
|
15 |
model.to(device)
|
16 |
|