Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -58,7 +58,7 @@ device = "cuda" if torch.cuda.is_available() else "cpu"
|
|
| 58 |
|
| 59 |
config['train']['cuda_visible_device'] = device
|
| 60 |
model = NamedCurves(config.model, device=device).to(device)
|
| 61 |
-
model.load_state_dict(torch.load(model_pt)["model_state_dict"])
|
| 62 |
|
| 63 |
def load_img(filename, norm=True,):
|
| 64 |
img = np.array(Image.open(filename).convert("RGB"))
|
|
|
|
| 58 |
|
| 59 |
config['train']['cuda_visible_device'] = device
|
| 60 |
model = NamedCurves(config.model, device=device).to(device)
|
| 61 |
+
model.load_state_dict(torch.load(model_pt, map_location="cpu")["model_state_dict"])
|
| 62 |
|
| 63 |
def load_img(filename, norm=True,):
|
| 64 |
img = np.array(Image.open(filename).convert("RGB"))
|