Ahsen Khaliq commited on
Commit
d258f57
1 Parent(s): 62eaa8e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -89,7 +89,7 @@ def inference(img, model):
89
  #aligned_face = align_face(img)
90
  cropped_array = cropper.crop(img)
91
 
92
- if cropped_array:
93
  aligned_face = Image.fromarray(cropped_array)
94
  else:
95
  aligned_face = Image.open(img)
 
89
  #aligned_face = align_face(img)
90
  cropped_array = cropper.crop(img)
91
 
92
+ if cropped_array.any():
93
  aligned_face = Image.fromarray(cropped_array)
94
  else:
95
  aligned_face = Image.open(img)