Ariamehr commited on
Commit
5c9e3d2
1 Parent(s): 93b886a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -13,7 +13,7 @@ from torchvision import transforms
13
 
14
  # ----------------- HELPER FUNCTIONS ----------------- #
15
 
16
- #ASSETS_DIR = os.path.join(os.path.dirname(__file__), "assets")
17
 
18
  LABELS_TO_IDS = {
19
  "Background": 0,
@@ -133,8 +133,8 @@ def create_legend_image(labels_to_ids: dict[str, int], filename="legend.png"):
133
  # ----------------- MODEL ----------------- #
134
 
135
  URL = "https://huggingface.co/facebook/sapiens/resolve/main/sapiens_lite_host/torchscript/depth/checkpoints/sapiens_0.3b/sapiens_0.3b_render_people_epoch_100_torchscript.pt2?download=true"
136
- #CHECKPOINTS_DIR = os.path.join(ASSETS_DIR, "checkpoints")
137
- model_path = os.path.join(os.path.dirname(__file__), "sapiens_0.3b_goliath_best_goliath_mIoU_7673_epoch_194_torchscript.pt2")
138
 
139
  if not os.path.exists(model_path):
140
  os.makedirs(CHECKPOINTS_DIR, exist_ok=True)
 
13
 
14
  # ----------------- HELPER FUNCTIONS ----------------- #
15
 
16
+ ASSETS_DIR = os.path.join(os.path.dirname(__file__), "assets")
17
 
18
  LABELS_TO_IDS = {
19
  "Background": 0,
 
133
  # ----------------- MODEL ----------------- #
134
 
135
  URL = "https://huggingface.co/facebook/sapiens/resolve/main/sapiens_lite_host/torchscript/depth/checkpoints/sapiens_0.3b/sapiens_0.3b_render_people_epoch_100_torchscript.pt2?download=true"
136
+ CHECKPOINTS_DIR = os.path.join(ASSETS_DIR, "checkpoints")
137
+ model_path = os.path.join(os.path.dirname(__file__), "sapiens_0.3b_render_people_epoch_100_torchscript.pt2")
138
 
139
  if not os.path.exists(model_path):
140
  os.makedirs(CHECKPOINTS_DIR, exist_ok=True)