Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -327,7 +327,7 @@ async def predict_tomato(file: UploadFile = File(...)):
|
|
| 327 |
"message": "Please upload a clear image of a PLANT leaf."
|
| 328 |
})
|
| 329 |
|
| 330 |
-
|
| 331 |
white_mask = (
|
| 332 |
(image_array[:, :, 0] > 240) &
|
| 333 |
(image_array[:, :, 1] > 240) &
|
|
|
|
| 327 |
"message": "Please upload a clear image of a PLANT leaf."
|
| 328 |
})
|
| 329 |
|
| 330 |
+
image_array = np.array(image)
|
| 331 |
white_mask = (
|
| 332 |
(image_array[:, :, 0] > 240) &
|
| 333 |
(image_array[:, :, 1] > 240) &
|