mpamt commited on
Commit
05330b2
1 Parent(s): b348589

Added cpu as map location

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -29,7 +29,7 @@ class Generator(nn.Module):
29
  return self.main(input)
30
 
31
  path = hf_hub_download('huggan/ArtGAN', 'ArtGAN.pt')
32
- model = torch.load(path)
33
  device = 'cuda' if torch.cuda.is_available() else 'cpu'
34
 
35
  def generate(seed):
 
29
  return self.main(input)
30
 
31
  path = hf_hub_download('huggan/ArtGAN', 'ArtGAN.pt')
32
+ model = torch.load(path, map_location=torch.device('cpu'))
33
  device = 'cuda' if torch.cuda.is_available() else 'cpu'
34
 
35
  def generate(seed):