File size: 741 Bytes
5e8395e
e5ce3a7
59ece0e
1ed5ce5
4915b46
 
 
 
 
 
5e8395e
59ece0e
4915b46
59ece0e
4915b46
 
 
 
 
 
 
59ece0e
 
 
4915b46
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
import gradio as gr
from utils.face_texture import GetFaceTexture
from utils.face_symmetry import GetFaceSymmetry


def combined_fn(input_image):
    texture_results = GetFaceTexture().main(input_image)
    symmetry_results = GetFaceSymmetry().main(input_image)
    return (*texture_results, *symmetry_results)


iface = gr.Interface(
    fn=combined_fn,
    inputs=gr.inputs.Image(type="pil"),
    outputs=[
        gr.outputs.Image(type="pil"),  # From GetFaceTexture
        gr.outputs.Image(type="pil"),  # From GetFaceTexture
        "text",                        # From GetFaceTexture
        gr.outputs.Image(type="pil"),  # From GetFaceSymmetry
        "text"                         # From GetFaceSymmetry
    ]
)

iface.launch()