Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -22,7 +22,7 @@ from model import Generator, GeneratorConfig
|
|
| 22 |
cfg = GeneratorConfig()
|
| 23 |
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
| 24 |
generator = Generator(cfg).to(device)
|
| 25 |
-
generator.load_state_dict(torch.load(generator_path))
|
| 26 |
generator.eval()
|
| 27 |
|
| 28 |
# Transformations
|
|
|
|
| 22 |
cfg = GeneratorConfig()
|
| 23 |
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
| 24 |
generator = Generator(cfg).to(device)
|
| 25 |
+
generator.load_state_dict(torch.load(generator_path, map_location=device))
|
| 26 |
generator.eval()
|
| 27 |
|
| 28 |
# Transformations
|