Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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 |
|