Jannat24 commited on
Commit
50d3a44
·
verified ·
1 Parent(s): c9b0750

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -6
app.py CHANGED
@@ -54,15 +54,11 @@ def gen_sources(deepfake_img):
54
  #------------Initialize:Decoder-F------------------------
55
  config_path = "./models/config.yaml"
56
  checkpoint_path_f = "./models/model_vaq1_ff.pth"
57
- checkpoint_f = torch.load(checkpoint_path_f, map_location=device)
58
- model_vaq_f = Generator(config_path, device)
59
- model_vaq_f = model_vaq_f.load_state_dict(checkpoint_f, strict=True)
60
  model_vaq_f.eval()
61
  #------------Initialize:Decoder-G------------------------
62
  checkpoint_path_g = "./models/model_vaq2_gg.pth"
63
- checkpoint_g = torch.load(checkpoint_path_g, map_location=device)
64
- model_vaq_g = Generator(config_path, device)
65
- model_vaq_g = model_vaq_g.load_state_dict(checkpoint_g, strict=True)
66
  model_vaq_g.eval()
67
  ##------------------------Initialize Model-F-------------------------------------
68
  model_z1 = DeepfakeToSourceTransformer().to(device)
 
54
  #------------Initialize:Decoder-F------------------------
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)