Arnab Das commited on
Commit
2afb6fa
·
1 Parent(s): c41a0f5
Files changed (1) hide show
  1. manipulate_model/utils.py +1 -1
manipulate_model/utils.py CHANGED
@@ -20,7 +20,7 @@ def get_config_and_model(model_root="manipulate_model/demo-model/audio"):
20
 
21
  model = Model(config=config)
22
  model_file = hf_hub_download("arnabdas8901/manipulation_detection_transformer", filename= "weights.pt")
23
- model = model._load_as_pickle(model, model_file, map_location="cpu")
24
  print("### Model loaded from :", model_file)
25
  #weights = torch.load(os.path.join(model_root, "weights.pt"))
26
  #model.load_state_dict(weights["model_state_dict"])
 
20
 
21
  model = Model(config=config)
22
  model_file = hf_hub_download("arnabdas8901/manipulation_detection_transformer", filename= "weights.pt")
23
+ model = model._load_as_pickle(model, model_file, map_location="cpu", strict=True)
24
  print("### Model loaded from :", model_file)
25
  #weights = torch.load(os.path.join(model_root, "weights.pt"))
26
  #model.load_state_dict(weights["model_state_dict"])