akhaliq HF staff commited on
Commit
b302e42
1 Parent(s): f7d82f4

Update util.py

Browse files
Files changed (1) hide show
  1. util.py +2 -2
util.py CHANGED
@@ -128,8 +128,8 @@ def align_face(filepath, output_size=256, transform_size=1024, enable_padding=Tr
128
  :param filepath: str
129
  :return: PIL Image
130
  """
131
- ensure_checkpoint_exists("models/dlibshape_predictor_68_face_landmarks.dat")
132
- predictor = dlib.shape_predictor("models/dlibshape_predictor_68_face_landmarks.dat")
133
  lm = get_landmark(filepath, predictor)
134
 
135
  lm_chin = lm[0: 17] # left-right
 
128
  :param filepath: str
129
  :return: PIL Image
130
  """
131
+ ensure_checkpoint_exists("dlibshape_predictor_68_face_landmarks.dat")
132
+ predictor = dlib.shape_predictor("dlibshape_predictor_68_face_landmarks.dat")
133
  lm = get_landmark(filepath, predictor)
134
 
135
  lm_chin = lm[0: 17] # left-right