Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -12,7 +12,7 @@ def predict(image):
|
|
12 |
model = models.resnet50(pretrained=True)
|
13 |
num_ftrs = model.fc.in_features
|
14 |
model.fc = nn.Linear(num_ftrs, 1)
|
15 |
-
model.load_state_dict(torch.load("
|
16 |
model.eval()
|
17 |
|
18 |
# Preprocess image
|
|
|
12 |
model = models.resnet50(pretrained=True)
|
13 |
num_ftrs = model.fc.in_features
|
14 |
model.fc = nn.Linear(num_ftrs, 1)
|
15 |
+
model.load_state_dict(torch.load("best_f1.pth", map_location=torch.device('cpu')))
|
16 |
model.eval()
|
17 |
|
18 |
# Preprocess image
|