user-agent commited on
Commit
d3bf39d
1 Parent(s): 7bacd5d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -430,9 +430,9 @@ def get_cropped_images(images,category):
430
 
431
  cropped_list.append(image)
432
 
433
- base64_images = [base64.b64encode(BytesIO(image.save(format='JPG')).getvalue()).decode('utf-8') for image in cropped_list]
434
 
435
-
 
436
  return base64_images
437
 
438
 
 
430
 
431
  cropped_list.append(image)
432
 
 
433
 
434
+ base64_images = [base64.b64encode(BytesIO(image.convert('RGB').save(format='JPEG').getvalue())).decode('utf-8') for image in cropped_list]
435
+
436
  return base64_images
437
 
438