Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -14,7 +14,7 @@ device = "cuda" if torch.cuda.is_available() else "cpu"
|
|
14 |
|
15 |
# Load model
|
16 |
model = UNet().to(device) # Move the model to the selected device
|
17 |
-
model_state_dict = torch.load(r"model.pth", map_location=device)
|
18 |
model.load_state_dict(model_state_dict["model_state_dict"])
|
19 |
|
20 |
scaler = min_max_scaler()
|
|
|
14 |
|
15 |
# Load model
|
16 |
model = UNet().to(device) # Move the model to the selected device
|
17 |
+
model_state_dict = torch.load(r"model.pth", map_location=device, weights_only=True)
|
18 |
model.load_state_dict(model_state_dict["model_state_dict"])
|
19 |
|
20 |
scaler = min_max_scaler()
|