M4xjunior commited on
Commit
22b780c
·
verified ·
1 Parent(s): 38ead61

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
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()