Kiwinicki commited on
Commit
a142579
·
verified ·
1 Parent(s): 35a938f

Update app.py

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