Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -33,7 +33,8 @@ class Generator(nn.Module):
|
|
33 |
netG = Generator()
|
34 |
|
35 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
36 |
-
|
|
|
37 |
netG.eval()
|
38 |
|
39 |
def generate_image():
|
|
|
33 |
netG = Generator()
|
34 |
|
35 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
36 |
+
model_file = "generator.pth"
|
37 |
+
netG.load_state_dict(torch.load(model_file, map_location=device))
|
38 |
netG.eval()
|
39 |
|
40 |
def generate_image():
|