Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -114,7 +114,7 @@ async def predict_fruitbot0(file: UploadFile = File(...)):
|
|
114 |
prediction1 = fruitbot_expanded.predict(img_array) # Get predictions
|
115 |
|
116 |
predicted_class_idx = np.argmax(prediction1, axis=1)[0] # Get predicted class index
|
117 |
-
predicted_class =
|
118 |
|
119 |
return JSONResponse(content={"prediction": predicted_class})
|
120 |
|
|
|
114 |
prediction1 = fruitbot_expanded.predict(img_array) # Get predictions
|
115 |
|
116 |
predicted_class_idx = np.argmax(prediction1, axis=1)[0] # Get predicted class index
|
117 |
+
predicted_class = FRUITBOT_EXPANDED_CLASSES[predicted_class_idx] # Convert to class name
|
118 |
|
119 |
return JSONResponse(content={"prediction": predicted_class})
|
120 |
|