Leacb4 commited on
Commit
5ac51d9
·
verified ·
1 Parent(s): 7f683c8

Upload example_usage.py with huggingface_hub

Browse files
Files changed (1) hide show
  1. example_usage.py +4 -4
example_usage.py CHANGED
@@ -37,14 +37,14 @@ def load_models_from_hf(repo_id: str, cache_dir: str = "./models_cache"):
37
  print(" 📦 Loading color model...")
38
  color_model_path = hf_hub_download(
39
  repo_id=repo_id,
40
- filename="color_model.pt",
41
  cache_dir=cache_dir
42
  )
43
 
44
  # Loading vocabulary
45
  vocab_path = hf_hub_download(
46
  repo_id=repo_id,
47
- filename=config.tokeniser_path,
48
  cache_dir=cache_dir
49
  )
50
 
@@ -66,7 +66,7 @@ def load_models_from_hf(repo_id: str, cache_dir: str = "./models_cache"):
66
  print(" 📦 Loading hierarchy model...")
67
  hierarchy_model_path = hf_hub_download(
68
  repo_id=repo_id,
69
- filename=config.hierarchy_model_path,
70
  cache_dir=cache_dir
71
  )
72
 
@@ -88,7 +88,7 @@ def load_models_from_hf(repo_id: str, cache_dir: str = "./models_cache"):
88
  print(" 📦 Loading main CLIP model...")
89
  main_model_path = hf_hub_download(
90
  repo_id=repo_id,
91
- filename=config.main_model_path,
92
  cache_dir=cache_dir
93
  )
94
 
 
37
  print(" 📦 Loading color model...")
38
  color_model_path = hf_hub_download(
39
  repo_id=repo_id,
40
+ filename="models/color_model.pt",
41
  cache_dir=cache_dir
42
  )
43
 
44
  # Loading vocabulary
45
  vocab_path = hf_hub_download(
46
  repo_id=repo_id,
47
+ filename="tokenizer_vocab.json",
48
  cache_dir=cache_dir
49
  )
50
 
 
66
  print(" 📦 Loading hierarchy model...")
67
  hierarchy_model_path = hf_hub_download(
68
  repo_id=repo_id,
69
+ filename="models/hierarchy_model.pth",
70
  cache_dir=cache_dir
71
  )
72
 
 
88
  print(" 📦 Loading main CLIP model...")
89
  main_model_path = hf_hub_download(
90
  repo_id=repo_id,
91
+ filename="models/gap_clip.pth",
92
  cache_dir=cache_dir
93
  )
94