Update app.py
Browse files
app.py
CHANGED
|
@@ -16,7 +16,7 @@ CONFIDENCE_THRESHOLD = 0.7
|
|
| 16 |
|
| 17 |
def predict_image(image):
|
| 18 |
try:
|
| 19 |
-
image = image.resize((
|
| 20 |
img_array = np.array(image, dtype=np.float32) / 255.0
|
| 21 |
img_array = np.expand_dims(img_array, axis=0)
|
| 22 |
|
|
|
|
| 16 |
|
| 17 |
def predict_image(image):
|
| 18 |
try:
|
| 19 |
+
image = image.resize((128, 128)).convert("RGB")
|
| 20 |
img_array = np.array(image, dtype=np.float32) / 255.0
|
| 21 |
img_array = np.expand_dims(img_array, axis=0)
|
| 22 |
|