Update app.py
Browse files
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.
|
| 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 |
|