YANGYYYY commited on
Commit
f877ad1
1 Parent(s): c74dca9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -2
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
- return image
 
 
 
 
32
  elif transfer_style == "Kon Satoshi":
33
- return image
 
 
 
 
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