Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -28,9 +28,17 @@ def transfer(image, transfer_style):
|
|
28 |
anime_img = predictor.transform_image(image)
|
29 |
return anime_img
|
30 |
elif transfer_style == "Shinkai":
|
31 |
-
|
|
|
|
|
|
|
|
|
32 |
elif transfer_style == "Kon Satoshi":
|
33 |
-
|
|
|
|
|
|
|
|
|
34 |
else:
|
35 |
return image
|
36 |
|
|
|
28 |
anime_img = predictor.transform_image(image)
|
29 |
return anime_img
|
30 |
elif transfer_style == "Shinkai":
|
31 |
+
args = parse_args()
|
32 |
+
args.weight = 'GeneratorV2_train_photo_Shinkai_init.pt'
|
33 |
+
predictor = Predictor(args.weight, args.device)
|
34 |
+
anime_img = predictor.transform_image(image)
|
35 |
+
return anime_img
|
36 |
elif transfer_style == "Kon Satoshi":
|
37 |
+
args = parse_args()
|
38 |
+
args.weight = 'GeneratorV2_train_photo_Paprika_init.pt'
|
39 |
+
predictor = Predictor(args.weight, args.device)
|
40 |
+
anime_img = predictor.transform_image(image)
|
41 |
+
return anime_img
|
42 |
else:
|
43 |
return image
|
44 |
|