saniaE commited on
Commit
a510479
·
1 Parent(s): 2aac227

updated gen model load state

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -47,7 +47,7 @@ def load_model():
47
  checkpoint = torch.load(model_path, map_location=DEVICE)
48
 
49
  gen_model = Generator(z_dim=Z_DIM).to(DEVICE)
50
- gen_model.load_state_dict(checkpoint["gen_state_dict"])
51
  gen_model.eval()
52
  print("✅ SUCCESS: Petrol Pump GAN is live!")
53
  except Exception as e:
 
47
  checkpoint = torch.load(model_path, map_location=DEVICE)
48
 
49
  gen_model = Generator(z_dim=Z_DIM).to(DEVICE)
50
+ gen_model.load_state_dict(checkpoint["gen_state_dict"], strict=False)
51
  gen_model.eval()
52
  print("✅ SUCCESS: Petrol Pump GAN is live!")
53
  except Exception as e: