Spaces:
				
			
			
	
			
			
		Runtime error
		
	
	
	
			
			
	
	
	
	
		
		
		Runtime error
		
	add hugging_face demo.
Browse files
    	
        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:// | 
| 24 | 
            -
            - **2022.09.09**: Integrated to :rocket: [Replicate](https://replicate.com/). Try out online demo! [](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! [](https://huggingface.co/spaces/sczhou/CodeFormer)
         | 
| 24 | 
            +
            - **2022.09.09**: Integrated to :rocket: [Replicate](https://replicate.com/explore). Try out online demo! [](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 | 
             
            [](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>shangchenzhou@gmail.com</b>.
         | 
| 220 |  | 
| 221 | 
             
            
         | 
| @@ -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 | 
| 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 | 
             
            [](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>shangchenzhou@gmail.com</b>.
         | 
| 222 |  | 
| 223 | 
             
            
         | 
|  | |
| 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()
         | 
