ygangang commited on
Commit
58b268b
·
1 Parent(s): 7b0cc40

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -12
app.py CHANGED
@@ -208,18 +208,18 @@ def inference(image, background_enhance, face_upsample, upscale, codeformer_fide
208
  return None, None
209
 
210
 
211
- title = "CodeFormer: Robust Face Restoration and Enhancement Network"
212
  description = r"""<center><img src='https://user-images.githubusercontent.com/14334509/189166076-94bb2cac-4f4e-40fb-a69f-66709e3d98f5.png' alt='CodeFormer logo'></center>
213
- <b>Official Gradio demo</b> for <a href='https://github.com/sczhou/CodeFormer' target='_blank'><b>Towards Robust Blind Face Restoration with Codebook Lookup Transformer (NeurIPS 2022)</b></a>.<br>
214
- 🔥 CodeFormer is a robust face restoration algorithm for old photos or AI-generated faces.<br>
215
- 🤗 Try CodeFormer for improved stable-diffusion generation!<br>
216
  """
217
  article = r"""
218
- If CodeFormer is helpful, please help to ⭐ the <a href='https://github.com/sczhou/CodeFormer' target='_blank'>Github Repo</a>. Thanks!
219
  [![GitHub Stars](https://img.shields.io/github/stars/sczhou/CodeFormer?style=social)](https://github.com/sczhou/CodeFormer)
220
 
221
  ---
222
-
223
  📝 **Citation**
224
 
225
  If our work is useful for your research, please consider citing:
@@ -246,14 +246,14 @@ If you have any questions, please feel free to reach me out at <b>shangchenzhou@
246
 
247
  demo = gr.Interface(
248
  inference, [
249
- gr.inputs.Image(type="filepath", label="Input"),
250
- gr.inputs.Checkbox(default=True, label="Background_Enhance"),
251
- gr.inputs.Checkbox(default=True, label="Face_Upsample"),
252
- gr.inputs.Number(default=2, label="Rescaling_Factor (up to 4)"),
253
  gr.Slider(0, 1, value=0.5, step=0.01, label='Codeformer_Fidelity (0 for better quality, 1 for better identity)')
254
  ], [
255
- gr.outputs.Image(type="numpy", label="Output"),
256
- gr.outputs.File(label="Download the output")
257
  ],
258
  title=title,
259
  description=description,
 
208
  return None, None
209
 
210
 
211
+ title = "CodeFormer: 强大的面部修复和增强网络"
212
  description = r"""<center><img src='https://user-images.githubusercontent.com/14334509/189166076-94bb2cac-4f4e-40fb-a69f-66709e3d98f5.png' alt='CodeFormer logo'></center>
213
+ 本页面是为方便英语不太好朋友了解如何使用,采用的是CPU,运算时间较长,请移步<b>官方Gradio示例获取更好效果</b> for <a href='https://github.com/sczhou/CodeFormer' target='_blank'><b>Towards Robust Blind Face Restoration with Codebook Lookup Transformer (NeurIPS 2022)</b></a>.<br>
214
+ 🔥 CodeFormer对于老照片和由AI生成人脸的强大的面部恢复算法.<br>
215
+ 🤗 使用CodeFormer来提高stable-diffusion的生成效果!<br>
216
  """
217
  article = r"""
218
+ 如果CodeFormer对你有帮助, 请在 <a href='https://github.com/sczhou/CodeFormer' target='_blank'>Github Repo</a>点 ⭐. 谢谢!
219
  [![GitHub Stars](https://img.shields.io/github/stars/sczhou/CodeFormer?style=social)](https://github.com/sczhou/CodeFormer)
220
 
221
  ---
222
+ 点击<a href='https://www.toolchest.cn' target='_blank'>返回智能工具箱</a>查看更多好玩的人工智能项目
223
  📝 **Citation**
224
 
225
  If our work is useful for your research, please consider citing:
 
246
 
247
  demo = gr.Interface(
248
  inference, [
249
+ gr.inputs.Image(type="filepath", label="输入"),
250
+ gr.inputs.Checkbox(default=True, label="背景增强"),
251
+ gr.inputs.Checkbox(default=True, label="面部增强"),
252
+ gr.inputs.Number(default=2, label="放大倍数 (最大4)"),
253
  gr.Slider(0, 1, value=0.5, step=0.01, label='Codeformer_Fidelity (0 for better quality, 1 for better identity)')
254
  ], [
255
+ gr.outputs.Image(type="numpy", label="输出"),
256
+ gr.outputs.File(label="下载输出")
257
  ],
258
  title=title,
259
  description=description,