Nathan Segers commited on
Commit
1c58f0c
·
1 Parent(s): c43fe72

fix: Change download paths and import

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -5,10 +5,12 @@ from huggingface_hub import hf_hub_download
5
 
6
  # 1) download your SavedModel from the Hub
7
  repo_id = "NathanSegers/masterclass-2025"
8
- model_dir = hf_hub_download(repo_id, filename="model_saved", repo_type="model", local_dir=".")
 
 
9
 
10
  # 2) load it
11
- model = tf.keras.models.load_model(model_dir)
12
 
13
  # 3) simple preprocess + predict
14
  CLASS_NAMES = ["cat","dog","panda"]
 
5
 
6
  # 1) download your SavedModel from the Hub
7
  repo_id = "NathanSegers/masterclass-2025"
8
+ hf_hub_download(repo_id, filename="config.json", repo_type="model", local_dir="./model")
9
+ hf_hub_download(repo_id, filename="metadata.json", repo_type="model", local_dir="./model")
10
+ hf_hub_download(repo_id, filename="model.weights.h5", repo_type="model", local_dir="./model")
11
 
12
  # 2) load it
13
+ model = tf.keras.models.load_model("./model")
14
 
15
  # 3) simple preprocess + predict
16
  CLASS_NAMES = ["cat","dog","panda"]