Doron Adler commited on
Commit
b674e2f
β€’
1 Parent(s): e5d2e00

Updated text, increased input size to 512x512

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -49,7 +49,7 @@ def img_concat_h(im1, im2):
49
 
50
  import gradio as gr
51
 
52
- def face2drag(
53
  img: Image.Image,
54
  size: int
55
  ) -> Image.Image:
@@ -77,13 +77,13 @@ import scipy.ndimage
77
  import requests
78
 
79
  def inference(img):
80
- out = face2drag(img, 512)
81
  return out
82
 
83
 
84
  title = "Comics hero"
85
- description = "Turn a face into the face of a \"Comics hero\". Upload an image with a face, or click on one of the examples below. If a face could not be detected, An image will still be created."
86
- article = "<p style='text-align: center'><a href='https://github.com/justinpinkney/pix2pixHD' target='_blank'>Github Repo</a></p><p style='text-align: center'>samples: <img src='https://hf.space/gradioiframe/Norod78/ComicsHero/file/Sample00001.jpg' alt='Sample00001'/><img src='https://hf.space/gradioiframe/Norod78/ComicsHero/file/Sample00002.jpg' alt='Sample00002'/><img src='https://hf.space/gradioiframe/Norod78/ComicsHero/file/Sample00003.jpg' alt='Sample00003'/><img src='https://hf.space/gradioiframe/Norod78/ComicsHero/file/Sample00004.jpg' alt='Sample00004'/><img src='https://hf.space/gradioiframe/Norod78/ComicsHero/file/Sample00005.jpg' alt='Sample00005'/></p><p>The \"Comics Hero\" model was trained using Pix2PixHD by Doron Adler</p>"
87
 
88
  examples=[['Example00001.jpg'],['Example00002.jpg'],['Example00003.jpg'],['Example00004.jpg'],['Example00005.jpg'], ['Example00006.jpg']]
89
- gr.Interface(inference, gr.inputs.Image(type="pil",shape=(256,256)), gr.outputs.Image(type="pil"),title=title,description=description,article=article,examples=examples,enable_queue=True).launch()
 
49
 
50
  import gradio as gr
51
 
52
+ def face2hero(
53
  img: Image.Image,
54
  size: int
55
  ) -> Image.Image:
 
77
  import requests
78
 
79
  def inference(img):
80
+ out = face2hero(img, 512)
81
  return out
82
 
83
 
84
  title = "Comics hero"
85
+ description = "Turn a face into the face of a \"Comics hero\". Upload an image with a face, or click on one of the examples below. If a face could not be detected, an image will still be created."
86
+ article = "<hr><p style='text-align: center'>See the <a href='https://github.com/justinpinkney/pix2pixHD' target='_blank'>Github Repo</a></p><p style='text-align: center'>samples: <img src='https://hf.space/gradioiframe/Norod78/ComicsHero/file/Sample00001.jpg' alt='Sample00001'/><img src='https://hf.space/gradioiframe/Norod78/ComicsHero/file/Sample00002.jpg' alt='Sample00002'/><img src='https://hf.space/gradioiframe/Norod78/ComicsHero/file/Sample00003.jpg' alt='Sample00003'/><img src='https://hf.space/gradioiframe/Norod78/ComicsHero/file/Sample00004.jpg' alt='Sample00004'/><img src='https://hf.space/gradioiframe/Norod78/ComicsHero/file/Sample00005.jpg' alt='Sample00005'/></p><p>The \"Comics Hero\" model was trained using Pix2PixHD by <a href='https://linktr.ee/Norod78' target='_blank'>Doron Adler</a></p>"
87
 
88
  examples=[['Example00001.jpg'],['Example00002.jpg'],['Example00003.jpg'],['Example00004.jpg'],['Example00005.jpg'], ['Example00006.jpg']]
89
+ gr.Interface(inference, gr.inputs.Image(type="pil",shape=(512,512)), gr.outputs.Image(type="pil"),title=title,description=description,article=article,examples=examples,enable_queue=True).launch()