Update app.py
Browse files
app.py
CHANGED
|
@@ -15,10 +15,8 @@ import tensorflow as tf
|
|
| 15 |
|
| 16 |
# Load your model (handle any custom layers if needed)
|
| 17 |
# If you have custom layers like RandomHeight, include them in custom_objects:
|
| 18 |
-
|
| 19 |
-
#
|
| 20 |
-
# "RandomWidth": tf.keras.layers.RandomWidth})
|
| 21 |
-
model = tf.keras.models.load_model("stone_artifact_classifier.h5", compile=False)
|
| 22 |
|
| 23 |
# Replace with your classes
|
| 24 |
class_names = ["arrowheads", "axehammerstones", "scrapers"]
|
|
|
|
| 15 |
|
| 16 |
# Load your model (handle any custom layers if needed)
|
| 17 |
# If you have custom layers like RandomHeight, include them in custom_objects:
|
| 18 |
+
model = tf.keras.models.load_model("stone_artifact_classifier.h5", compile=False, custom_objects={"RandomHeight": tf.keras.layers.RandomHeight, "RandomWidth": tf.keras.layers.RandomWidth})
|
| 19 |
+
#model = tf.keras.models.load_model("stone_artifact_classifier.h5", compile=False)
|
|
|
|
|
|
|
| 20 |
|
| 21 |
# Replace with your classes
|
| 22 |
class_names = ["arrowheads", "axehammerstones", "scrapers"]
|