File size: 597 Bytes
290f9b9
51b72e4
 
 
 
 
 
 
 
 
 
 
 
 
 
ee36313
290f9b9
 
51b72e4
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import gradio as gr
from model.face_enhancer import enhance_face
from model.dress_enhancer import enhance_clothes

def enhance_image(input_image):
    face_enhanced = enhance_face(input_image)
    final_image = enhance_clothes(face_enhanced)
    return final_image

demo = gr.Interface(
    fn=enhance_image,
    inputs=gr.Image(type="pil", label="Upload an image"),
    outputs=gr.Image(type="pil", label="Enhanced Image"),
    title="Face + Dress Image Enhancer",
    description="Enhances facial details using GFPGAN and clothing using SwinIR.",
)

if __name__ == "__main__":
    demo.launch()