Cropinky commited on
Commit
9e71099
1 Parent(s): e96e758
Files changed (2) hide show
  1. app.py +2 -2
  2. networks_fastgan.py +1 -1
app.py CHANGED
@@ -3,10 +3,10 @@ from huggingface_hub import PyTorchModelHubMixin
3
  import torch
4
  import matplotlib.pyplot as plt
5
  import torchvision
6
- from networks_fastgan import Generator
7
 
8
  def image_generation(model, number_of_images=1):
9
- G = Generator.from_pretrained("cropinky/projected_gan_impressionism")
10
  return f"generating {number_of_images} images from {model}"
11
  if __name__ == "__main__":
12
 
 
3
  import torch
4
  import matplotlib.pyplot as plt
5
  import torchvision
6
+ from networks_fastgan import MyGenerator
7
 
8
  def image_generation(model, number_of_images=1):
9
+ G = MyGenerator.from_pretrained("Cropinky/projected_gan_impressionism")
10
  return f"generating {number_of_images} images from {model}"
11
  if __name__ == "__main__":
12
 
networks_fastgan.py CHANGED
@@ -147,7 +147,7 @@ class FastganSynthesisCond(nn.Module):
147
  return self.to_big(feat_last)
148
 
149
 
150
- class Generator(nn.Module, PyTorchModelHubMixin):
151
  def __init__(
152
  self,
153
  z_dim=256,
 
147
  return self.to_big(feat_last)
148
 
149
 
150
+ class MyGenerator(nn.Module, PyTorchModelHubMixin):
151
  def __init__(
152
  self,
153
  z_dim=256,