Update app.py
Browse files
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 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
|
|
|
|
|
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()
|