Ahsen Khaliq commited on
Commit
a058c0e
1 Parent(s): fa82f73

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -82,14 +82,14 @@ def inference(img):
82
 
83
  original_my_sample = original_generator(my_w, input_is_latent=True)
84
  my_sample = generator(my_w, input_is_latent=True)
85
- npimage = my_sample[0].permute(1, 2, 0).detach().numpy()[:,:,::-1]
86
  imageio.imwrite('filename.jpeg', npimage)
87
  return 'filename.jpeg'
88
 
89
- title = "JojoGAN"
90
  description = "Gradio Demo for JoJoGAN: One Shot Face Stylization. To use it, simply upload your image, or click one of the examples to load them. Read more at the links below."
91
 
92
  article = "<p style='text-align: center'><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>"
93
 
94
  examples=[['iu.jpeg']]
95
- gr.Interface(inference, [gr.inputs.Image(type="pil")], gr.outputs.Image(type="file"),title=title,description=description,article=article,enable_queue=True,allow_flagging=False,examples=examples).launch()
82
 
83
  original_my_sample = original_generator(my_w, input_is_latent=True)
84
  my_sample = generator(my_w, input_is_latent=True)
85
+ npimage = my_sample[0].permute(1, 2, 0).detach().numpy()
86
  imageio.imwrite('filename.jpeg', npimage)
87
  return 'filename.jpeg'
88
 
89
+ title = "JoJoGAN"
90
  description = "Gradio Demo for JoJoGAN: One Shot Face Stylization. To use it, simply upload your image, or click one of the examples to load them. Read more at the links below."
91
 
92
  article = "<p style='text-align: center'><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>"
93
 
94
  examples=[['iu.jpeg']]
95
+ gr.Interface(inference, [gr.inputs.Image(type="pil",shape=(512,512))], gr.outputs.Image(type="file"),title=title,description=description,article=article,enable_queue=True,allow_flagging=False,examples=examples).launch()