Rounak28 commited on
Commit
f62a9dc
1 Parent(s): 55e7e88

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -8,7 +8,7 @@ device = "cuda" if torch.cuda.is_available() else "mps" if torch.backends.mps.is
8
 
9
  from model import UNet
10
  model = UNet(in_channels=1, out_channels=1)
11
- model.load_state_dict(torch.load("models/model.pth"))
12
  model.to(device)
13
 
14
 
 
8
 
9
  from model import UNet
10
  model = UNet(in_channels=1, out_channels=1)
11
+ model.load_state_dict(torch.load("models/model.pth", map_location=torch.device('cpu')))
12
  model.to(device)
13
 
14