kendrickfff
commited on
Commit
•
b7f2ac3
1
Parent(s):
413219b
Update app.py
Browse files
app.py
CHANGED
@@ -108,7 +108,7 @@ def load_model():
|
|
108 |
model.fc = nn.Linear(num_ftrs, 12) # Adjust to the number of classes you have
|
109 |
|
110 |
# Load the state dict
|
111 |
-
model.load_state_dict(torch.load('
|
112 |
|
113 |
model.eval() # Set to evaluation mode
|
114 |
return model
|
|
|
108 |
model.fc = nn.Linear(num_ftrs, 12) # Adjust to the number of classes you have
|
109 |
|
110 |
# Load the state dict
|
111 |
+
model.load_state_dict(torch.load('resnet50_garbage_classification.pth', map_location=torch.device('cpu')))
|
112 |
|
113 |
model.eval() # Set to evaluation mode
|
114 |
return model
|