Ahsen Khaliq commited on
Commit
b5472dd
1 Parent(s): 2241df0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +0 -6
app.py CHANGED
@@ -52,7 +52,6 @@ import collections
52
  from typing import Union, List
53
  import numpy as np
54
  from PIL import Image
55
- import matplotlib.pyplot as plt
56
 
57
 
58
  def get_dlib_face_detector(predictor_path: str = "shape_predictor_68_face_landmarks.dat"):
@@ -102,10 +101,6 @@ def display_facial_landmarks(
102
  'teeth': pred_type(slice(60, 68), (0.596, 0.875, 0.541, 0.4))
103
  }
104
 
105
- fig = plt.figure(figsize=fig_size)
106
- ax = fig.add_subplot(1, 1, 1)
107
- ax.imshow(img)
108
- ax.axis('off')
109
 
110
  for face in landmarks:
111
  for pred_type in pred_types.values():
@@ -114,7 +109,6 @@ def display_facial_landmarks(
114
  face[pred_type.slice, 1],
115
  color=pred_type.color, **plot_style
116
  )
117
- plt.show()
118
 
119
  import PIL.Image
120
  import PIL.ImageFile
 
52
  from typing import Union, List
53
  import numpy as np
54
  from PIL import Image
 
55
 
56
 
57
  def get_dlib_face_detector(predictor_path: str = "shape_predictor_68_face_landmarks.dat"):
 
101
  'teeth': pred_type(slice(60, 68), (0.596, 0.875, 0.541, 0.4))
102
  }
103
 
 
 
 
 
104
 
105
  for face in landmarks:
106
  for pred_type in pred_types.values():
 
109
  face[pred_type.slice, 1],
110
  color=pred_type.color, **plot_style
111
  )
 
112
 
113
  import PIL.Image
114
  import PIL.ImageFile