Ahsen Khaliq commited on
Commit
92b7005
1 Parent(s): 2a375c8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -6
app.py CHANGED
@@ -3,7 +3,7 @@ os.system("git clone https://github.com/bryandlee/animegan2-pytorch")
3
 
4
  os.system("gdown https://drive.google.com/uc?id=1WK5Mdt6mwlcsqCZMHkCUSDJxN1UyFi0-")
5
  os.system("gdown https://drive.google.com/uc?id=18H3iK09_d54qEDoWIc82SyWB2xun4gjU")
6
- os.system("pip install dlib")
7
 
8
  import sys
9
  sys.path.append("animegan2-pytorch")
@@ -167,13 +167,11 @@ import requests
167
 
168
  def inference(image):
169
  img = image
170
- face_detector = get_dlib_face_detector()
171
- landmarks = face_detector(img)
172
 
173
 
174
- for landmark in landmarks:
175
- face = align_and_crop_face(img, landmark, expand=1.3)
176
- out = face2paint(face, 512)
177
 
178
  return out
179
 
 
3
 
4
  os.system("gdown https://drive.google.com/uc?id=1WK5Mdt6mwlcsqCZMHkCUSDJxN1UyFi0-")
5
  os.system("gdown https://drive.google.com/uc?id=18H3iK09_d54qEDoWIc82SyWB2xun4gjU")
6
+ #os.system("pip install dlib")
7
 
8
  import sys
9
  sys.path.append("animegan2-pytorch")
 
167
 
168
  def inference(image):
169
  img = image
170
+ #face_detector = get_dlib_face_detector()
171
+ #landmarks = face_detector(img)
172
 
173
 
174
+ out = face2paint(img, 512)
 
 
175
 
176
  return out
177