MissingBreath commited on
Commit
c6168f9
·
verified ·
1 Parent(s): 5ee6fad

Update api.py

Browse files
Files changed (1) hide show
  1. api.py +1 -1
api.py CHANGED
@@ -225,7 +225,7 @@ async def classify(image: UploadFile = File(...)):
225
 
226
  # Crop the image based on bounding box
227
  cropped_image = results[0].orig_img[int(y1):int(y2), int(x1):int(x2)]
228
-
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)
 
225
 
226
  # Crop the image based on bounding box
227
  cropped_image = results[0].orig_img[int(y1):int(y2), int(x1):int(x2)]
228
+ cropped_image = Image.fromarray(cropped_image)
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)