Arnab Das commited on
Commit
c41a0f5
·
1 Parent(s): ffe0082
Files changed (1) hide show
  1. manipulate_model/utils.py +2 -1
manipulate_model/utils.py CHANGED
@@ -20,7 +20,8 @@ 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
- print(model_file)
 
24
  #weights = torch.load(os.path.join(model_root, "weights.pt"))
25
  #model.load_state_dict(weights["model_state_dict"])
26
 
 
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"])
27