Ahsen Khaliq
commited on
Commit
•
6dcb58e
1
Parent(s):
416c8ad
Update app.py
Browse files
app.py
CHANGED
@@ -21,9 +21,6 @@ def inference(content, style, index):
|
|
21 |
imgc = cv2.imread('content.png')
|
22 |
img_cropc = fa.get_crop_image(imgc)
|
23 |
cv2.imwrite('contentcrop.png', img_cropc)
|
24 |
-
imgs = cv2.imread('style.png')
|
25 |
-
img_crops = fa.get_crop_image(imgs)
|
26 |
-
cv2.imwrite('stylecrop.png', img_crops)
|
27 |
os.system("""python style_transfer_folder.py --size 1024 --add_weight_index """+str(int(index))+""" --ckpt ./blendgan.pt --psp_encoder_ckpt ./psp_encoder.pt --style_img_path style.png --input_img_path contentcrop.png""")
|
28 |
return "out.jpg"
|
29 |
|
|
|
21 |
imgc = cv2.imread('content.png')
|
22 |
img_cropc = fa.get_crop_image(imgc)
|
23 |
cv2.imwrite('contentcrop.png', img_cropc)
|
|
|
|
|
|
|
24 |
os.system("""python style_transfer_folder.py --size 1024 --add_weight_index """+str(int(index))+""" --ckpt ./blendgan.pt --psp_encoder_ckpt ./psp_encoder.pt --style_img_path style.png --input_img_path contentcrop.png""")
|
25 |
return "out.jpg"
|
26 |
|