Ahsen Khaliq commited on
Commit
5195870
1 Parent(s): d558166

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -5
app.py CHANGED
@@ -24,7 +24,7 @@ from face_model.face_gan import FaceGAN
24
  from sr_model.real_esrnet import RealESRNet
25
  from align_faces import warp_and_crop_face, get_reference_facial_points
26
  import torch
27
- torch.hub.download_url_to_file('https://upload.wikimedia.org/wikipedia/commons/thumb/a/ab/Abraham_Lincoln_O-77_matte_collodion_print.jpg/1024px-Abraham_Lincoln_O-77_matte_collodion_print.jpg', 'lincoln.jpg')
28
  torch.hub.download_url_to_file('https://upload.wikimedia.org/wikipedia/commons/5/50/Albert_Einstein_%28Nobel%29.png', 'einstein.png')
29
 
30
  class FaceEnhancement(object):
@@ -119,9 +119,12 @@ def inference(file):
119
  img, orig_faces, enhanced_faces = faceenhancer.process(im)
120
  return enhanced_faces[0][:,:,::-1]
121
 
122
- title = "GFP-GAN"
123
- description = "Gradio demo for GFP-GAN: Towards Real-World Blind Face Restoration with Generative Facial Prior. To use it, simply upload your image, or click one of the examples to load them. Read more at the links below. Please click submit only once"
124
- article = "<p style='text-align: center'><a href='https://arxiv.org/abs/2101.04061'>Towards Real-World Blind Face Restoration with Generative Facial Prior</a> | <a href='https://github.com/TencentARC/GFPGAN'>Github Repo</a></p><center><img src='https://visitor-badge.glitch.me/badge?page_id=akhaliq_GFPGAN' alt='visitor badge'></center>"
 
 
 
125
  gr.Interface(
126
  inference,
127
  [gr.inputs.Image(type="filepath", label="Input")],
@@ -130,7 +133,7 @@ gr.Interface(
130
  description=description,
131
  article=article,
132
  examples=[
133
- ['lincoln.jpg'],
134
  ['einstein.png']
135
  ],
136
  enable_queue=True
 
24
  from sr_model.real_esrnet import RealESRNet
25
  from align_faces import warp_and_crop_face, get_reference_facial_points
26
  import torch
27
+ torch.hub.download_url_to_file('https://upload.wikimedia.org/wikipedia/commons/thumb/e/ec/Mona_Lisa%2C_by_Leonardo_da_Vinci%2C_from_C2RMF_retouched.jpg/800px-Mona_Lisa%2C_by_Leonardo_da_Vinci%2C_from_C2RMF_retouched.jpg', 'mona.jpg')
28
  torch.hub.download_url_to_file('https://upload.wikimedia.org/wikipedia/commons/5/50/Albert_Einstein_%28Nobel%29.png', 'einstein.png')
29
 
30
  class FaceEnhancement(object):
 
119
  img, orig_faces, enhanced_faces = faceenhancer.process(im)
120
  return enhanced_faces[0][:,:,::-1]
121
 
122
+ title = "GPEN"
123
+ description = "Gradio demo for GAN Prior Embedded Network for Blind Face Restoration in the Wild. To use it, simply upload your image, or click one of the examples to load them. Read more at the links below."
124
+
125
+ article = "<p style='text-align: center'><a href='https://arxiv.org/abs/2105.06070'>GAN Prior Embedded Network for Blind Face Restoration in the Wild</a> | <a href='https://github.com/yangxy/GPEN'>Github Repo</a></p><center><img src='https://visitor-badge.glitch.me/badge?page_id=akhaliq_GPEN' alt='visitor badge'></center>"
126
+
127
+
128
  gr.Interface(
129
  inference,
130
  [gr.inputs.Image(type="filepath", label="Input")],
 
133
  description=description,
134
  article=article,
135
  examples=[
136
+ ['mona.jpg'],
137
  ['einstein.png']
138
  ],
139
  enable_queue=True