Update app.py
Browse files
app.py
CHANGED
|
@@ -3,15 +3,8 @@ import tensorflow as tf
|
|
| 3 |
import numpy as np
|
| 4 |
|
| 5 |
|
| 6 |
-
model_path = "iris_mlp.
|
| 7 |
-
model = tf.keras.
|
| 8 |
-
tf.keras.layers.InputLayer(input_shape=[4]),
|
| 9 |
-
tf.keras.layers.BatchNormalization(),
|
| 10 |
-
tf.keras.layers.Dense(32, activation="relu"),
|
| 11 |
-
tf.keras.layers.Dense(16, activation="relu"),
|
| 12 |
-
tf.keras.layers.Dense(3, activation="softmax")
|
| 13 |
-
])
|
| 14 |
-
model.load_weights(model_path)
|
| 15 |
|
| 16 |
labels = ['Setosa', 'Versicolour', 'Virginica']
|
| 17 |
|
|
|
|
| 3 |
import numpy as np
|
| 4 |
|
| 5 |
|
| 6 |
+
model_path = "iris_mlp.keras"
|
| 7 |
+
model = tf.keras.models.load(model_path)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 8 |
|
| 9 |
labels = ['Setosa', 'Versicolour', 'Virginica']
|
| 10 |
|