Update app.py
Browse files
app.py
CHANGED
@@ -48,7 +48,7 @@ model = Cnn()
|
|
48 |
model_weights_path = 'model_weights.pth'
|
49 |
|
50 |
# Load the model weights
|
51 |
-
model.load_state_dict(torch.load(model_weights_path
|
52 |
|
53 |
# Set the model to evaluation mode for inference
|
54 |
model.eval()
|
|
|
48 |
model_weights_path = 'model_weights.pth'
|
49 |
|
50 |
# Load the model weights
|
51 |
+
model.load_state_dict(torch.load(model_weights_path,map_location=torch.device('cpu')))
|
52 |
|
53 |
# Set the model to evaluation mode for inference
|
54 |
model.eval()
|