Update app.py
Browse files
app.py
CHANGED
@@ -137,7 +137,7 @@ model = models.resnet34(pretrained=False) # Load base ResNet-34
|
|
137 |
model.fc = torch.nn.Linear(model.fc.in_features, 2) # Modify final layer
|
138 |
|
139 |
# Load weights properly
|
140 |
-
checkpoint = torch.load("
|
141 |
|
142 |
# Extract just the model weights (ignore optimizer states)
|
143 |
if "network" in checkpoint: # Handle different checkpoint formats
|
|
|
137 |
model.fc = torch.nn.Linear(model.fc.in_features, 2) # Modify final layer
|
138 |
|
139 |
# Load weights properly
|
140 |
+
checkpoint = torch.load("resnet34.pth", map_location="cpu")
|
141 |
|
142 |
# Extract just the model weights (ignore optimizer states)
|
143 |
if "network" in checkpoint: # Handle different checkpoint formats
|