Nick088 commited on
Commit
e3b189f
1 Parent(s): 7ac0a46

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -5
app.py CHANGED
@@ -114,10 +114,10 @@ def inference(img, version, scale):
114
 
115
 
116
  title = "GFPGAN: Practical Face Restoration Algorithm"
117
- description = r"""Gradio demo for <a href='https://github.com/TencentARC/GFPGAN' target='_blank'><b>GFPGAN: Towards Real-World Blind Face Restoration with Generative Facial Prior</b></a>.<br>
118
  It can be used to restore your **old photos** or improve **AI-generated faces**.<br>
119
  To use it, simply upload your image.<br>
120
- If GFPGAN is helpful, please help to ⭐ the <a href='https://github.com/TencentARC/GFPGAN' target='_blank'>Github Repo</a> and recommend it to your friends 😊
121
  """
122
  article = r"""
123
 
@@ -125,19 +125,21 @@ article = r"""
125
  [![GitHub Stars](https://img.shields.io/github/stars/TencentARC/GFPGAN?style=social)](https://github.com/TencentARC/GFPGAN)
126
  [![arXiv](https://img.shields.io/badge/arXiv-Paper-<COLOR>.svg)](https://arxiv.org/abs/2101.04061)
127
 
128
- If you have any question, please email 📧 `xintao.wang@outlook.com` or `xintaowang@tencent.com`.
129
 
130
  <center><img src='https://visitor-badge.glitch.me/badge?page_id=akhaliq_GFPGAN' alt='visitor badge'></center>
131
  <center><img src='https://visitor-badge.glitch.me/badge?page_id=Gradio_Xintao_GFPGAN' alt='visitor badge'></center>
132
  """
133
  demo = gr.Interface(
134
- inference, [
 
135
  gr.Image(type="filepath", label="Input"),
136
  # gr.Radio(['v1.2', 'v1.3', 'v1.4', 'RestoreFormer', 'CodeFormer'], type="value", value='v1.4', label='version'),
137
  gr.Radio(['v1.2', 'v1.3', 'v1.4', 'RestoreFormer'], type="value", value='v1.4', label='version'),
138
  gr.Number(label="Rescaling factor", value=2),
139
  # gr.Slider(0, 100, label='Weight, only for CodeFormer. 0 for better quality, 100 for better identity', value=50)
140
- ], [
 
141
  gr.Image(type="numpy", label="Output (The whole image)"),
142
  gr.File(label="Download the output image")
143
  ],
 
114
 
115
 
116
  title = "GFPGAN: Practical Face Restoration Algorithm"
117
+ description = r"""Gradio demo Fix for <a href='https://github.com/TencentARC/GFPGAN' target='_blank'><b>GFPGAN: Towards Real-World Blind Face Restoration with Generative Facial Prior</b></a>.<br>
118
  It can be used to restore your **old photos** or improve **AI-generated faces**.<br>
119
  To use it, simply upload your image.<br>
120
+ If GFPGAN is helpful, please help to ⭐ the <a href='https://github.com/Nick088Official/GFPGAN-Fix' target='_blank'>Github Repo</a> and recommend it to your friends 😊
121
  """
122
  article = r"""
123
 
 
125
  [![GitHub Stars](https://img.shields.io/github/stars/TencentARC/GFPGAN?style=social)](https://github.com/TencentARC/GFPGAN)
126
  [![arXiv](https://img.shields.io/badge/arXiv-Paper-<COLOR>.svg)](https://arxiv.org/abs/2101.04061)
127
 
128
+ If you have any question, please email 📧 `xintao.wang@outlook.com` or `xintaowang@tencent.com` (original creators).
129
 
130
  <center><img src='https://visitor-badge.glitch.me/badge?page_id=akhaliq_GFPGAN' alt='visitor badge'></center>
131
  <center><img src='https://visitor-badge.glitch.me/badge?page_id=Gradio_Xintao_GFPGAN' alt='visitor badge'></center>
132
  """
133
  demo = gr.Interface(
134
+ fn=inference,
135
+ inputs=[
136
  gr.Image(type="filepath", label="Input"),
137
  # gr.Radio(['v1.2', 'v1.3', 'v1.4', 'RestoreFormer', 'CodeFormer'], type="value", value='v1.4', label='version'),
138
  gr.Radio(['v1.2', 'v1.3', 'v1.4', 'RestoreFormer'], type="value", value='v1.4', label='version'),
139
  gr.Number(label="Rescaling factor", value=2),
140
  # gr.Slider(0, 100, label='Weight, only for CodeFormer. 0 for better quality, 100 for better identity', value=50)
141
+ ],
142
+ outputs=[
143
  gr.Image(type="numpy", label="Output (The whole image)"),
144
  gr.File(label="Download the output image")
145
  ],