kuhs commited on
Commit
420f9d2
·
verified ·
1 Parent(s): 0bb4655

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -9
app.py CHANGED
@@ -4,15 +4,11 @@ from PIL import Image
4
  import numpy as np
5
 
6
  # Load your custom regression model
7
- model_path = "kia_mnist_keras_model.weights.h5"
8
- model = tf.keras.Sequential([
9
- tf.keras.layers.Flatten(input_shape=[28, 28]),
10
- tf.keras.layers.Rescaling(1./255.),
11
- tf.keras.layers.Dense(300, activation="relu"),
12
- tf.keras.layers.Dense(100, activation="relu"),
13
- tf.keras.layers.Dense(10, activation="softmax")
14
- ])
15
- model.load_weights(model_path)
16
 
17
  labels = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9']
18
 
 
4
  import numpy as np
5
 
6
  # Load your custom regression model
7
+ model_path = "kia_mnist_keras_model.weights.h5"
8
+ model_path = "kia_mnist_keras_model.keras"
9
+
10
+ #model.load_weights(model_path)
11
+ model = tf.keras.models.load_model(model_path)
 
 
 
 
12
 
13
  labels = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9']
14