hungdang1610 commited on
Commit
35dee14
1 Parent(s): bacdd82
Files changed (1) hide show
  1. app.py +2 -0
app.py CHANGED
@@ -79,6 +79,8 @@ if img_file_buffer is None:
79
  if img_file_buffer is not None:
80
  # To read image file buffer as a PIL Image:
81
  img = Image.open(img_file_buffer)
 
 
82
 
83
  detected_face = mtcnn2(img)
84
  if detected_face is None:
 
79
  if img_file_buffer is not None:
80
  # To read image file buffer as a PIL Image:
81
  img = Image.open(img_file_buffer)
82
+ if img.mode == 'RGBA':
83
+ img = img.convert('RGB')
84
 
85
  detected_face = mtcnn2(img)
86
  if detected_face is None: