Update pipeline.py
Browse files- pipeline.py +6 -1
pipeline.py
CHANGED
|
@@ -24,7 +24,12 @@ if not os.path.exists("efficientnet-b0"):
|
|
| 24 |
|
| 25 |
# Load models.
|
| 26 |
# Load model without compiling to avoid optimizer dependency issues
|
| 27 |
-
model
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 28 |
|
| 29 |
|
| 30 |
|
|
|
|
| 24 |
|
| 25 |
# Load models.
|
| 26 |
# Load model without compiling to avoid optimizer dependency issues
|
| 27 |
+
# Load model using TFSMLayer (Keras 3 compatible)
|
| 28 |
+
model = tf.keras.layers.TFSMLayer(
|
| 29 |
+
"efficientnet-b0/",
|
| 30 |
+
call_endpoint="serving_default"
|
| 31 |
+
)
|
| 32 |
+
|
| 33 |
|
| 34 |
|
| 35 |
|