wufan commited on
Commit
cad4ba9
1 Parent(s): acd09f6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -6
app.py CHANGED
@@ -10,13 +10,13 @@ from PIL import Image
10
  from huggingface_hub import snapshot_download
11
 
12
  # == download weights ==
13
- tiny_model_dir = snapshot_download('wanderkid/unimernet_tiny')
14
- small_model_dir = snapshot_download('wanderkid/unimernet_small')
15
- base_model_dir = snapshot_download('wanderkid/unimernet_base')
16
 
17
- os.system(f"sed -i 's/MODEL_DIR/{tiny_model_dir}/g' cfg_tiny.yaml")
18
- os.system(f"sed -i 's/MODEL_DIR/{small_model_dir}/g' cfg_small.yaml")
19
- os.system(f"sed -i 's/MODEL_DIR/{base_model_dir}/g' cfg_base.yaml")
20
  # root_path = os.path.abspath(os.getcwd())
21
  # os.makedirs(os.path.join(root_path, "models"), exist_ok=True)
22
  # shutil.move(tiny_model_dir, os.path.join(root_path, "models", "unimernet_tiny"))
 
10
  from huggingface_hub import snapshot_download
11
 
12
  # == download weights ==
13
+ tiny_model_dir = snapshot_download('wanderkid/unimernet_tiny', local_dir='./models/unimernet_tiny')
14
+ small_model_dir = snapshot_download('wanderkid/unimernet_small', local_dir='./models/unimernet_small')
15
+ base_model_dir = snapshot_download('wanderkid/unimernet_base', local_dir='./models/unimernet_base')
16
 
17
+ # os.system(f"sed -i 's/MODEL_DIR/{tiny_model_dir}/g' cfg_tiny.yaml")
18
+ # os.system(f"sed -i 's/MODEL_DIR/{small_model_dir}/g' cfg_small.yaml")
19
+ # os.system(f"sed -i 's/MODEL_DIR/{base_model_dir}/g' cfg_base.yaml")
20
  # root_path = os.path.abspath(os.getcwd())
21
  # os.makedirs(os.path.join(root_path, "models"), exist_ok=True)
22
  # shutil.move(tiny_model_dir, os.path.join(root_path, "models", "unimernet_tiny"))