Unearthed commited on
Commit
1c578d9
Β·
verified Β·
1 Parent(s): 4861c50

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -10,7 +10,7 @@ from scipy.spatial import cKDTree
10
 
11
  # ── Config ───────────────────────────────────────────────────
12
  MODEL_REPO = "Unearthed/artifact-classifier"
13
- MODEL_FILE = "lithic_classifier0531.h5"
14
  IMG_SIZE = (224, 224)
15
 
16
  CONF_THRESHOLD = 0.55
@@ -39,6 +39,7 @@ def display_category(cls_name):
39
  print("Loading model...")
40
  model_path = hf_hub_download(repo_id=MODEL_REPO, filename=MODEL_FILE)
41
  import keras
 
42
  model = tf.keras.models.load_model(model_path, compile=False)
43
  print("Model ready!")
44
 
 
10
 
11
  # ── Config ───────────────────────────────────────────────────
12
  MODEL_REPO = "Unearthed/artifact-classifier"
13
+ MODEL_FILE = "lithic_classifier0531.keras"
14
  IMG_SIZE = (224, 224)
15
 
16
  CONF_THRESHOLD = 0.55
 
39
  print("Loading model...")
40
  model_path = hf_hub_download(repo_id=MODEL_REPO, filename=MODEL_FILE)
41
  import keras
42
+ keras.config.enable_unsafe_deserialization()
43
  model = tf.keras.models.load_model(model_path, compile=False)
44
  print("Model ready!")
45