sczhou commited on
Commit
4d598f8
Β·
1 Parent(s): e349013

add hugging_face demo.

Browse files
Files changed (2) hide show
  1. README.md +2 -2
  2. app.py +7 -5
README.md CHANGED
@@ -20,8 +20,8 @@ S-Lab, Nanyang Technological University
20
 
21
  ### Update
22
 
23
- - **2022.09.14**: Integrated to :hugs: [Hugging Face](https://replicate.com/). Try out online demo! [![Hugging Face](https://img.shields.io/badge/Demo-%F0%9F%A4%97%20Hugging%20Face-blue)](https://huggingface.co/spaces/sczhou/CodeFormer)
24
- - **2022.09.09**: Integrated to :rocket: [Replicate](https://replicate.com/). Try out online demo! [![Replicate](https://img.shields.io/badge/Demo-%F0%9F%9A%80%20Replicate-blue)](https://replicate.com/sczhou/codeformer)
25
  - **2022.09.04**: Add face upsampling `--face_upsample` for high-resolution AI-created face enhancement.
26
  - **2022.08.23**: Some modifications on face detection and fusion for better AI-created face enhancement.
27
  - **2022.08.07**: Integrate [Real-ESRGAN](https://github.com/xinntao/Real-ESRGAN) to support background image enhancement.
 
20
 
21
  ### Update
22
 
23
+ - **2022.09.14**: Integrated to :hugs: [Hugging Face](https://huggingface.co/spaces). Try out online demo! [![Hugging Face](https://img.shields.io/badge/Demo-%F0%9F%A4%97%20Hugging%20Face-blue)](https://huggingface.co/spaces/sczhou/CodeFormer)
24
+ - **2022.09.09**: Integrated to :rocket: [Replicate](https://replicate.com/explore). Try out online demo! [![Replicate](https://img.shields.io/badge/Demo-%F0%9F%9A%80%20Replicate-blue)](https://replicate.com/sczhou/codeformer)
25
  - **2022.09.04**: Add face upsampling `--face_upsample` for high-resolution AI-created face enhancement.
26
  - **2022.08.23**: Some modifications on face detection and fusion for better AI-created face enhancement.
27
  - **2022.08.07**: Integrate [Real-ESRGAN](https://github.com/xinntao/Real-ESRGAN) to support background image enhancement.
app.py CHANGED
@@ -199,12 +199,13 @@ description = r"""<center><img src='https://user-images.githubusercontent.com/14
199
  πŸ€— Try CodeFormer for improved stable-diffusion generation!<br>
200
  """
201
  article = r"""
202
- If CodeFormer is helpful, please help to ⭐ the <a href='https://github.com/sczhou/CodeFormer' target='_blank'>Github Repo</a>. Thanks!
203
  [![GitHub Stars](https://img.shields.io/github/stars/sczhou/CodeFormer?style=social)](https://github.com/sczhou/CodeFormer)
204
 
205
  ---
206
 
207
- πŸ“ Citation
 
208
  If our work is useful for your research, please consider citing:
209
  ```bibtex
210
  @article{zhou2022codeformer,
@@ -215,7 +216,8 @@ If our work is useful for your research, please consider citing:
215
  }
216
  ```
217
 
218
- πŸ“§ Contact
 
219
  If you have any questions, please feel free to reach me out at <b>[email protected]</b>.
220
 
221
  ![visitors](https://visitor-badge.glitch.me/badge?page_id=sczhou/CodeFormer)
@@ -227,7 +229,7 @@ gr.Interface(
227
  gr.inputs.Checkbox(default=True, label="Background_Enhance"),
228
  gr.inputs.Checkbox(default=True, label="Face_Upsample"),
229
  gr.inputs.Number(default=2, label="Rescaling_Factor"),
230
- gr.Slider(0, 1, value=0.5, step=0.01, label='Codeformer_Fidelity, 0 for better quality, 1 for better identity')
231
  ], [
232
  gr.outputs.Image(type="numpy", label="Output"),
233
  ],
@@ -241,4 +243,4 @@ gr.Interface(
241
  ['04.jpg', True, True, 2, 0.1],
242
  ['05.jpg', True, True, 2, 0.1]
243
  ]
244
- ).launch()
 
199
  πŸ€— Try CodeFormer for improved stable-diffusion generation!<br>
200
  """
201
  article = r"""
202
+ If CodeFormer is helpful, please help to ⭐ the <a href='https://github.com/sczhou/CodeFormer' target='_blank'>Github Repo</a>. Thanks!
203
  [![GitHub Stars](https://img.shields.io/github/stars/sczhou/CodeFormer?style=social)](https://github.com/sczhou/CodeFormer)
204
 
205
  ---
206
 
207
+ πŸ“ **Citation**
208
+
209
  If our work is useful for your research, please consider citing:
210
  ```bibtex
211
  @article{zhou2022codeformer,
 
216
  }
217
  ```
218
 
219
+ πŸ“§ **Contact**
220
+
221
  If you have any questions, please feel free to reach me out at <b>[email protected]</b>.
222
 
223
  ![visitors](https://visitor-badge.glitch.me/badge?page_id=sczhou/CodeFormer)
 
229
  gr.inputs.Checkbox(default=True, label="Background_Enhance"),
230
  gr.inputs.Checkbox(default=True, label="Face_Upsample"),
231
  gr.inputs.Number(default=2, label="Rescaling_Factor"),
232
+ gr.Slider(0, 1, value=0.5, step=0.01, label='Codeformer_Fidelity: 0 for better quality, 1 for better identity')
233
  ], [
234
  gr.outputs.Image(type="numpy", label="Output"),
235
  ],
 
243
  ['04.jpg', True, True, 2, 0.1],
244
  ['05.jpg', True, True, 2, 0.1]
245
  ]
246
+ ).launch()