changed checkpoint path
Browse files
app.py
CHANGED
|
@@ -39,7 +39,7 @@ def load_class_names():
|
|
| 39 |
def load_model():
|
| 40 |
try:
|
| 41 |
model = ResNet50(num_classes=1000)
|
| 42 |
-
checkpoint = torch.load("checkpoints
|
| 43 |
# Extract just the model state dict from the checkpoint
|
| 44 |
if "model_state_dict" in checkpoint:
|
| 45 |
model.load_state_dict(checkpoint["model_state_dict"])
|
|
|
|
| 39 |
def load_model():
|
| 40 |
try:
|
| 41 |
model = ResNet50(num_classes=1000)
|
| 42 |
+
checkpoint = torch.load("./checkpoints/model_best.pth", map_location=torch.device("cpu"))
|
| 43 |
# Extract just the model state dict from the checkpoint
|
| 44 |
if "model_state_dict" in checkpoint:
|
| 45 |
model.load_state_dict(checkpoint["model_state_dict"])
|