Update app.py
Browse files
app.py
CHANGED
@@ -23,7 +23,7 @@ def inference(img_path, Style, if_face=None):
|
|
23 |
print(img_path, Style, if_face)
|
24 |
try:
|
25 |
img = cv2.imread(img_path)
|
26 |
-
img = resize_image(img,True) if if_face=="Yes" else resize_image(img,False)
|
27 |
img = cv2.cvtColor(img, cv2.COLOR_BGR2RGB)
|
28 |
if Style == "AnimeGANv3_Arcane":
|
29 |
f = "A"
|
@@ -43,8 +43,8 @@ def inference(img_path, Style, if_face=None):
|
|
43 |
f = "U"
|
44 |
|
45 |
try:
|
46 |
-
|
47 |
-
det_face = False
|
48 |
output = AnimeGANv3_src.Convert(img, f, det_face)
|
49 |
|
50 |
save_path = f"output/out.{img_path.rsplit('.')[-1]}"
|
|
|
23 |
print(img_path, Style, if_face)
|
24 |
try:
|
25 |
img = cv2.imread(img_path)
|
26 |
+
#img = resize_image(img,True) if if_face=="Yes" else resize_image(img,False)
|
27 |
img = cv2.cvtColor(img, cv2.COLOR_BGR2RGB)
|
28 |
if Style == "AnimeGANv3_Arcane":
|
29 |
f = "A"
|
|
|
43 |
f = "U"
|
44 |
|
45 |
try:
|
46 |
+
det_face = True if if_face=="Yes" else False
|
47 |
+
#det_face = False
|
48 |
output = AnimeGANv3_src.Convert(img, f, det_face)
|
49 |
|
50 |
save_path = f"output/out.{img_path.rsplit('.')[-1]}"
|