thinh-researcher commited on
Commit
9a0bf16
·
1 Parent(s): 9b8ec7b

Update: download to local_dir

Browse files
streamlit_apps/app_utils/depth_model.py CHANGED
@@ -40,10 +40,11 @@ class DPTDepth(BaseDepthModel):
40
  if not os.path.isfile(weights_path):
41
  from huggingface_hub import hf_hub_download
42
 
43
- downloaded_filepath = hf_hub_download(
44
- repo_id="RGBD-SOD/S-MultiMAE", filename=weights_fname
 
 
45
  )
46
- os.system(f'mv "{downloaded_filepath}" weights')
47
  omnidata_ckpt = torch.load(
48
  weights_path,
49
  map_location="cpu",
 
40
  if not os.path.isfile(weights_path):
41
  from huggingface_hub import hf_hub_download
42
 
43
+ hf_hub_download(
44
+ repo_id="RGBD-SOD/S-MultiMAE",
45
+ filename=weights_fname,
46
+ local_dir="weights",
47
  )
 
48
  omnidata_ckpt = torch.load(
49
  weights_path,
50
  map_location="cpu",
streamlit_apps/app_utils/sod_selection_ui.py CHANGED
@@ -34,10 +34,11 @@ def load_smultimae_model(
34
  if not os.path.isfile(ckpt_path):
35
  from huggingface_hub import hf_hub_download
36
 
37
- downloaded_filepath = hf_hub_download(
38
- repo_id="RGBD-SOD/S-MultiMAE", filename=weights_fname
 
 
39
  )
40
- os.system(f'mv "{downloaded_filepath}" weights')
41
  assert os.path.isfile(ckpt_path)
42
 
43
  # sod_model = ModelPL.load_from_checkpoint(
 
34
  if not os.path.isfile(ckpt_path):
35
  from huggingface_hub import hf_hub_download
36
 
37
+ hf_hub_download(
38
+ repo_id="RGBD-SOD/S-MultiMAE",
39
+ filename=weights_fname,
40
+ local_dir="weights",
41
  )
 
42
  assert os.path.isfile(ckpt_path)
43
 
44
  # sod_model = ModelPL.load_from_checkpoint(