Jannat24 commited on
Commit
ec0d70d
·
verified ·
1 Parent(s): 3566513

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +0 -2
app.py CHANGED
@@ -55,11 +55,9 @@ def gen_sources(deepfake_img):
55
  config_path = "./models/config.yaml"
56
  checkpoint_path_f = "./models/model_vaq1_ff.pth"
57
  model_vaq_f = Generator(config_path, checkpoint_path_f, device)
58
- model_vaq_f.eval()
59
  #------------Initialize:Decoder-G------------------------
60
  checkpoint_path_g = "./models/model_vaq2_gg.pth"
61
  model_vaq_g = Generator(config_path, checkpoint_path_g, device)
62
- model_vaq_g.eval()
63
  ##------------------------Initialize Model-F-------------------------------------
64
  model_z1 = DeepfakeToSourceTransformer().to(device)
65
  model_z1.load_state_dict(torch.load("./models/model_z1_ff.pth",map_location=device),strict=True)
 
55
  config_path = "./models/config.yaml"
56
  checkpoint_path_f = "./models/model_vaq1_ff.pth"
57
  model_vaq_f = Generator(config_path, checkpoint_path_f, device)
 
58
  #------------Initialize:Decoder-G------------------------
59
  checkpoint_path_g = "./models/model_vaq2_gg.pth"
60
  model_vaq_g = Generator(config_path, checkpoint_path_g, device)
 
61
  ##------------------------Initialize Model-F-------------------------------------
62
  model_z1 = DeepfakeToSourceTransformer().to(device)
63
  model_z1.load_state_dict(torch.load("./models/model_z1_ff.pth",map_location=device),strict=True)