Xintao commited on
Commit
a722a95
1 Parent(s): e03007b
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -45,7 +45,7 @@ face_enhancer = GFPGANer(
45
  os.makedirs('output', exist_ok=True)
46
 
47
 
48
- def inference(img, scale):
49
  img = cv2.imread(img, cv2.IMREAD_UNCHANGED)
50
 
51
  h, w = img.shape[0:2]
@@ -70,7 +70,7 @@ title = "GFPGAN: Practical Face Restoration Algorithm"
70
  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"
71
  article = "<p style='text-align: center'><a href='https://arxiv.org/abs/2101.04061' target='_blank'>Towards Real-World Blind Face Restoration with Generative Facial Prior</a> | <a href='https://github.com/TencentARC/GFPGAN' target='_blank'>Github Repo</a></p><center><img src='https://visitor-badge.glitch.me/badge?page_id=akhaliq_GFPGAN' alt='visitor badge'></center>"
72
  gr.Interface(
73
- inference, [gr.inputs.Image(type="filepath", label="Input"), gr.inputs.Number(value=2, lable="Rescaling factor")],
74
  gr.outputs.Image(type="numpy", label="Output (The whole image)"),
75
  title=title,
76
  description=description,
 
45
  os.makedirs('output', exist_ok=True)
46
 
47
 
48
+ def inference(img, scale=2):
49
  img = cv2.imread(img, cv2.IMREAD_UNCHANGED)
50
 
51
  h, w = img.shape[0:2]
 
70
  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"
71
  article = "<p style='text-align: center'><a href='https://arxiv.org/abs/2101.04061' target='_blank'>Towards Real-World Blind Face Restoration with Generative Facial Prior</a> | <a href='https://github.com/TencentARC/GFPGAN' target='_blank'>Github Repo</a></p><center><img src='https://visitor-badge.glitch.me/badge?page_id=akhaliq_GFPGAN' alt='visitor badge'></center>"
72
  gr.Interface(
73
+ inference, [gr.inputs.Image(type="filepath", label="Input"), gr.Number(lable="Rescaling factor", precision=2)],
74
  gr.outputs.Image(type="numpy", label="Output (The whole image)"),
75
  title=title,
76
  description=description,