trysem commited on
Commit
41c4126
·
1 Parent(s): 08ffdc6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -11
app.py CHANGED
@@ -107,18 +107,18 @@ def inference(img, version, scale):
107
  except Exception as error:
108
  print('global exception', error)
109
  return None, None
110
-
111
-
112
- title = "Image Upscaling & Restoration(esp. Face) using GFPGAN Algorithm"
113
- description = r"""Gradio demo for <a href='https://github.com/TencentARC/GFPGAN' target='_blank'><b>GFPGAN: Towards Real-World Blind Face Restoration and Upscalling of the image with a Generative Facial Prior</b></a>.<br>
114
- Practically the algorithm is used to restore your **old photos** or improve **AI-generated faces**.<br>
115
- To use it, simply just upload the concerned image.<br>
 
 
 
116
  """
117
  article = r"""
118
- [![download](https://img.shields.io/github/downloads/TencentARC/GFPGAN/total.svg)](https://github.com/TencentARC/GFPGAN/releases)
119
- [![GitHub Stars](https://img.shields.io/github/stars/TencentARC/GFPGAN?style=social)](https://github.com/TencentARC/GFPGAN)
120
- [![arXiv](https://img.shields.io/badge/arXiv-Paper-<COLOR>.svg)](https://arxiv.org/abs/2101.04061)
121
- <center><img src='https://visitor-badge.glitch.me/badge?page_id=dj_face_restoration_GFPGAN' alt='visitor badge'></center>
122
  """
123
  demo = gr.Interface(
124
  inference, [
@@ -127,7 +127,7 @@ demo = gr.Interface(
127
  gr.inputs.Radio(['v1.2', 'v1.3', 'v1.4', 'RestoreFormer','CodeFormer','RealESR-General-x4v3'], type="value", default='v1.4', label='version'),
128
  gr.inputs.Number(label="Rescaling factor", default=2),
129
  # gr.Slider(0, 100, label='Weight, only for CodeFormer. 0 for better quality, 100 for better identity', default=50)
130
- ], [
131
  gr.outputs.Image(type="numpy", label="Output (The whole image)"),
132
  gr.outputs.File(label="Download the output image")
133
  ],
 
107
  except Exception as error:
108
  print('global exception', error)
109
  return None, None
110
+ custom_css="""
111
+ .gradio_wrapper .gradio_bg[is_embedded=false] .gradio_page .footer {
112
+ visibility: hidden;
113
+ }
114
+ """
115
+ title = "Image Upscaling & Restoration(esp. Face)"
116
+ description = r"""
117
+ Restore your **old photos** or improve **AI-generated faces**.<br>
118
+ To use it, simply just upload the image.<br>
119
  """
120
  article = r"""
121
+
 
 
 
122
  """
123
  demo = gr.Interface(
124
  inference, [
 
127
  gr.inputs.Radio(['v1.2', 'v1.3', 'v1.4', 'RestoreFormer','CodeFormer','RealESR-General-x4v3'], type="value", default='v1.4', label='version'),
128
  gr.inputs.Number(label="Rescaling factor", default=2),
129
  # gr.Slider(0, 100, label='Weight, only for CodeFormer. 0 for better quality, 100 for better identity', default=50)
130
+ css=custom_css], [
131
  gr.outputs.Image(type="numpy", label="Output (The whole image)"),
132
  gr.outputs.File(label="Download the output image")
133
  ],