Spaces:
Sleeping
Sleeping
Commit
·
1d35a85
1
Parent(s):
2ab7142
Update app.py
Browse files
app.py
CHANGED
|
@@ -36,6 +36,7 @@ cnn_model.summary()
|
|
| 36 |
|
| 37 |
|
| 38 |
def predict_input_image(img):
|
|
|
|
| 39 |
img_4d = img.reshape(1, 224, 224, 3)
|
| 40 |
img_4d = img_4d / 255.0
|
| 41 |
prediction = softmax(cnn_model.predict(img_4d)[0]).numpy()
|
|
|
|
| 36 |
|
| 37 |
|
| 38 |
def predict_input_image(img):
|
| 39 |
+
img = np.resize(img, (224, 224, 3))
|
| 40 |
img_4d = img.reshape(1, 224, 224, 3)
|
| 41 |
img_4d = img_4d / 255.0
|
| 42 |
prediction = softmax(cnn_model.predict(img_4d)[0]).numpy()
|