Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -10,7 +10,7 @@ def load_model():
|
|
| 10 |
model = load_model()
|
| 11 |
|
| 12 |
def predict(image):
|
| 13 |
-
image = image.reshape((-1,
|
| 14 |
preds = model.predict(image)[0] # Assuming single image prediction
|
| 15 |
labels = ['Bean', 'Bitter_Gourd', 'Bottle_Gourd', 'Brinjal', 'Broccoli',
|
| 16 |
'Cabbage', 'Capsicum', 'Carrot', 'Cauliflower', 'Cucumber',
|
|
|
|
| 10 |
model = load_model()
|
| 11 |
|
| 12 |
def predict(image):
|
| 13 |
+
image = image.reshape((-1, 224, 224, 3)) # Ensure image has the correct shape
|
| 14 |
preds = model.predict(image)[0] # Assuming single image prediction
|
| 15 |
labels = ['Bean', 'Bitter_Gourd', 'Bottle_Gourd', 'Brinjal', 'Broccoli',
|
| 16 |
'Cabbage', 'Capsicum', 'Carrot', 'Cauliflower', 'Cucumber',
|