Spaces:
Sleeping
Sleeping
Update main.py
Browse files
main.py
CHANGED
|
@@ -40,7 +40,7 @@ app.mount("/static", StaticFiles(directory="static"), name="static")
|
|
| 40 |
in_channels = 3
|
| 41 |
out_channels = 7
|
| 42 |
model = CNN(in_channels, out_channels)
|
| 43 |
-
model.load_state_dict(torch.load('model/ckpt_cnn.pth', map_location=torch.device('cpu')))
|
| 44 |
model.eval()
|
| 45 |
|
| 46 |
# HTML form with JavaScript for AJAX
|
|
|
|
| 40 |
in_channels = 3
|
| 41 |
out_channels = 7
|
| 42 |
model = CNN(in_channels, out_channels)
|
| 43 |
+
model.load_state_dict(torch.load('model/ckpt_cnn.pth', map_location=torch.device('cpu'), weights_only=True))
|
| 44 |
model.eval()
|
| 45 |
|
| 46 |
# HTML form with JavaScript for AJAX
|