Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -45,8 +45,8 @@ if uploaded_img is not None:
|
|
| 45 |
input_img = img_resized.reshape(1,28,28,1)
|
| 46 |
|
| 47 |
#model.predict(np.zeros((1, 28, 28, 1), dtype=np.float32))
|
| 48 |
-
dummy_input = tf.zeros((1, 28, 28, 1))
|
| 49 |
-
_ = model(dummy_input)
|
| 50 |
|
| 51 |
st.image(img_resized, caption="Uploaded Image (Resized to 28x28)", use_container_width =True, channels="GRAY")
|
| 52 |
|
|
@@ -54,7 +54,7 @@ if uploaded_img is not None:
|
|
| 54 |
selected_layer = conv_layers[layer_ind]
|
| 55 |
|
| 56 |
#func_model = Model(inputs = model.layers[0].input, outputs = model.selected_layer.output)
|
| 57 |
-
func_model = Model(inputs = model.input, outputs = selected_layer.output)
|
| 58 |
|
| 59 |
|
| 60 |
fm = func_model.predict(input_img)
|
|
|
|
| 45 |
input_img = img_resized.reshape(1,28,28,1)
|
| 46 |
|
| 47 |
#model.predict(np.zeros((1, 28, 28, 1), dtype=np.float32))
|
| 48 |
+
# dummy_input = tf.zeros((1, 28, 28, 1))
|
| 49 |
+
# _ = model(dummy_input)
|
| 50 |
|
| 51 |
st.image(img_resized, caption="Uploaded Image (Resized to 28x28)", use_container_width =True, channels="GRAY")
|
| 52 |
|
|
|
|
| 54 |
selected_layer = conv_layers[layer_ind]
|
| 55 |
|
| 56 |
#func_model = Model(inputs = model.layers[0].input, outputs = model.selected_layer.output)
|
| 57 |
+
func_model = Model(inputs = model.layers[0].input, outputs = selected_layer.output)
|
| 58 |
|
| 59 |
|
| 60 |
fm = func_model.predict(input_img)
|