Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
@@ -4,7 +4,7 @@ model = keras.models.load_model('potatoes2.h5')
|
|
4 |
class_names = ['Potato___Early_blight', 'Potato___Late_blight', 'Potato___healthy']
|
5 |
|
6 |
def predict_input_image(img):
|
7 |
-
img_4d=img.reshape(-1,256,256,
|
8 |
prediction=model.predict(img_4d)[0]
|
9 |
return {class_names[i]: float(prediction[i]) for i in range(len(class_names))}
|
10 |
|
|
|
4 |
class_names = ['Potato___Early_blight', 'Potato___Late_blight', 'Potato___healthy']
|
5 |
|
6 |
def predict_input_image(img):
|
7 |
+
img_4d=img.reshape(-1,256,256,3)
|
8 |
prediction=model.predict(img_4d)[0]
|
9 |
return {class_names[i]: float(prediction[i]) for i in range(len(class_names))}
|
10 |
|