Spaces:
Sleeping
Sleeping
Update api.py
Browse files
api.py
CHANGED
|
@@ -229,7 +229,7 @@ async def classify(image: UploadFile = File(...)):
|
|
| 229 |
cropped_image = cropped_image.resize((64,64))
|
| 230 |
img_array = np.array(cropped_image) / 255.0
|
| 231 |
img_array = np.expand_dims(img_array, axis=0)
|
| 232 |
-
predictions =
|
| 233 |
predicted_class_idx = np.argmax(predictions)
|
| 234 |
predicted_class_idx = int(predicted_class_idx)
|
| 235 |
|
|
|
|
| 229 |
cropped_image = cropped_image.resize((64,64))
|
| 230 |
img_array = np.array(cropped_image) / 255.0
|
| 231 |
img_array = np.expand_dims(img_array, axis=0)
|
| 232 |
+
predictions = model.predict(img_array)
|
| 233 |
predicted_class_idx = np.argmax(predictions)
|
| 234 |
predicted_class_idx = int(predicted_class_idx)
|
| 235 |
|