Ahsen Khaliq commited on
Commit
38887ff
1 Parent(s): 8d7ec90

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -67,6 +67,7 @@ os.system("gdown https://drive.google.com/uc?id=1-8E0PFT37v5fZs-61oIrFbNpE28Unp2
67
 
68
  ckpt = torch.load('jojo.pt', map_location=lambda storage, loc: storage)
69
  generator.load_state_dict(ckpt["g"], strict=False)
 
70
  def inference(img):
71
  aligned_face = align_face(img)
72
 
@@ -87,4 +88,4 @@ description = "Gradio Demo for JoJoGAN: One Shot Face Stylization. To use it, si
87
  article = "<p style='text-align: center'><a href='https://arxiv.org/abs/2112.11641' target='_blank'>JoJoGAN: One Shot Face Stylization</a>| <a href='https://github.com/mchong6/JoJoGAN' target='_blank'>Github Repo Pytorch</a></p> <center><img src='https://visitor-badge.glitch.me/badge?page_id=akhaliq_jojogan' alt='visitor badge'></center> <p style='text-align: center'>samples from repo: <img src='https://raw.githubusercontent.com/mchong6/JoJoGAN/main/teaser.jpg' alt='animation'/></p>"
88
 
89
  examples=[['iu.jpeg']]
90
- gr.Interface(inference, [gr.inputs.Image(type="filepath")], gr.outputs.Image(type="file"),title=title,description=description,article=article,enable_queue=True,allow_flagging=False,examples=examples).launch()
67
 
68
  ckpt = torch.load('jojo.pt', map_location=lambda storage, loc: storage)
69
  generator.load_state_dict(ckpt["g"], strict=False)
70
+
71
  def inference(img):
72
  aligned_face = align_face(img)
73
 
88
  article = "<p style='text-align: center'><a href='https://arxiv.org/abs/2112.11641' target='_blank'>JoJoGAN: One Shot Face Stylization</a>| <a href='https://github.com/mchong6/JoJoGAN' target='_blank'>Github Repo Pytorch</a></p> <center><img src='https://visitor-badge.glitch.me/badge?page_id=akhaliq_jojogan' alt='visitor badge'></center> <p style='text-align: center'>samples from repo: <img src='https://raw.githubusercontent.com/mchong6/JoJoGAN/main/teaser.jpg' alt='animation'/></p>"
89
 
90
  examples=[['iu.jpeg']]
91
+ gr.Interface(inference, [gr.inputs.Image(type="filepath",shape=(512,512))], gr.outputs.Image(type="file"),title=title,description=description,article=article,enable_queue=True,allow_flagging=False,examples=examples).launch()