Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -9,7 +9,7 @@ model= models.resnet18(pretrained=True)
|
|
| 9 |
model.fc = torch.nn.Linear(model.fc.in_features,2)
|
| 10 |
state_dict=torch.load('up500Model.pt', map_location='cpu')
|
| 11 |
model.load_state_dict(state_dict)
|
| 12 |
-
model.eval
|
| 13 |
|
| 14 |
#predictions
|
| 15 |
imgTransforms = transforms.Comporse([transforms.Resize(256), transforms.CenterCrop(224), trasforms.ToTensor(),transforms.Normalize([0.485,0.456,0.406],[0.229,0.224,0.225])])
|
|
|
|
| 9 |
model.fc = torch.nn.Linear(model.fc.in_features,2)
|
| 10 |
state_dict=torch.load('up500Model.pt', map_location='cpu')
|
| 11 |
model.load_state_dict(state_dict)
|
| 12 |
+
model.eval()
|
| 13 |
|
| 14 |
#predictions
|
| 15 |
imgTransforms = transforms.Comporse([transforms.Resize(256), transforms.CenterCrop(224), trasforms.ToTensor(),transforms.Normalize([0.485,0.456,0.406],[0.229,0.224,0.225])])
|