Spaces:
Sleeping
Sleeping
Update streamlit_app.py
Browse files- streamlit_app.py +1 -1
streamlit_app.py
CHANGED
@@ -20,7 +20,7 @@ except:
|
|
20 |
def load_model():
|
21 |
model = models.resnet18(pretrained=False)
|
22 |
model.fc = torch.nn.Linear(model.fc.in_features, len(class_names))
|
23 |
-
model.load_state_dict(torch.load("
|
24 |
model.eval()
|
25 |
return model
|
26 |
|
|
|
20 |
def load_model():
|
21 |
model = models.resnet18(pretrained=False)
|
22 |
model.fc = torch.nn.Linear(model.fc.in_features, len(class_names))
|
23 |
+
model.load_state_dict(torch.load("butterfly_classifier.pth", map_location="cpu"))
|
24 |
model.eval()
|
25 |
return model
|
26 |
|