doevent commited on
Commit
28708d4
1 Parent(s): f7e68a6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +17 -15
app.py CHANGED
@@ -116,18 +116,20 @@ article = r"""
116
  [![GitHub Stars](https://img.shields.io/github/stars/TencentARC/GFPGAN?style=social)](https://github.com/TencentARC/GFPGAN)
117
  [![arXiv](https://img.shields.io/badge/arXiv-Paper-<COLOR>.svg)](https://arxiv.org/abs/2101.04061)
118
  """
119
- gr.Interface(
120
- inference, [
121
- gr.inputs.Image(type="filepath", label="Input"),
122
- gr.inputs.Radio(['v1.2', 'v1.3', 'v1.4', 'RestoreFormer', 'CodeFormer'], type="value", default='v1.4', label='version'),
123
- gr.inputs.Number(label="Rescaling factor", default=2),
124
- gr.Slider(0, 100, label='Weight, only for CodeFormer. 0 for better quality, 100 for better identity', default=50)
125
- ], [
126
- gr.outputs.Image(type="numpy", label="Output (The whole image)"),
127
- gr.outputs.File(label="Download the output image")
128
- ],
129
- title=title,
130
- description=description,
131
- article=article,
132
- examples=[['AI-generate.jpg', 'v1.4', 2, 50], ['lincoln.jpg', 'v1.4', 2, 50], ['Blake_Lively.jpg', 'v1.4', 2, 50],
133
- ['10045.png', 'v1.4', 2, 50]]).launch(enable_queue=True)
 
 
 
116
  [![GitHub Stars](https://img.shields.io/github/stars/TencentARC/GFPGAN?style=social)](https://github.com/TencentARC/GFPGAN)
117
  [![arXiv](https://img.shields.io/badge/arXiv-Paper-<COLOR>.svg)](https://arxiv.org/abs/2101.04061)
118
  """
119
+ demo = gr.Interface(
120
+ inference, [
121
+ gr.inputs.Image(type="filepath", label="Input"),
122
+ gr.inputs.Radio(['v1.2', 'v1.3', 'v1.4', 'RestoreFormer', 'CodeFormer'], type="value", default='v1.4', label='version'),
123
+ gr.inputs.Number(label="Rescaling factor", default=2),
124
+ gr.Slider(0, 100, label='Weight, only for CodeFormer. 0 for better quality, 100 for better identity', default=50)
125
+ ], [
126
+ gr.outputs.Image(type="numpy", label="Output (The whole image)"),
127
+ gr.outputs.File(label="Download the output image")
128
+ ],
129
+ title=title,
130
+ description=description,
131
+ article=article,
132
+ examples=[['AI-generate.jpg', 'v1.4', 2, 50], ['lincoln.jpg', 'v1.4', 2, 50], ['Blake_Lively.jpg', 'v1.4', 2, 50],
133
+ ['10045.png', 'v1.4', 2, 50]])
134
+ demo.queue()
135
+ demo.launch()