YANGYYYY commited on
Commit
139ee29
1 Parent(s): 385ddd4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -6,6 +6,8 @@ import argparse
6
  from inference import Predictor
7
  #from black import to_black
8
 
 
 
9
  def parse_args():
10
  parser = argparse.ArgumentParser()
11
  parser.add_argument('--weight', type=str, default='cartoonize/GeneratorV2_train_photo_Hayao_init.pt')
@@ -16,7 +18,7 @@ def parse_args():
16
  def transfer(image, transfer_style):
17
  if transfer_style == "Hayao":
18
  #output = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)# 转换为灰度图像
19
- os.system("wget https://huggingface.co/YANGYYYY/cartoonize/resolve/main/GeneratorV2_train_photo_Hayao_init.pt")
20
  args = parse_args()
21
  predictor = Predictor(args.weight, args.device)
22
  anime_img = predictor.transform_image(args.src, save_path)
 
6
  from inference import Predictor
7
  #from black import to_black
8
 
9
+ os.system("wget https://huggingface.co/YANGYYYY/cartoonize/resolve/main/GeneratorV2_train_photo_Hayao_init.pt")
10
+
11
  def parse_args():
12
  parser = argparse.ArgumentParser()
13
  parser.add_argument('--weight', type=str, default='cartoonize/GeneratorV2_train_photo_Hayao_init.pt')
 
18
  def transfer(image, transfer_style):
19
  if transfer_style == "Hayao":
20
  #output = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)# 转换为灰度图像
21
+ #os.system("wget https://huggingface.co/YANGYYYY/cartoonize/resolve/main/GeneratorV2_train_photo_Hayao_init.pt")
22
  args = parse_args()
23
  predictor = Predictor(args.weight, args.device)
24
  anime_img = predictor.transform_image(args.src, save_path)