File size: 407 Bytes
c247df2
1a79a25
c247df2
 
2c0a276
c247df2
 
 
 
 
 
 
 
bfc3012
 
c247df2
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import gradio as gr
from pred_color import *

example_sample = [
    "Boy.jpeg",
    "babyxiang_ai.png"
]

def pred_func(img):
    out = single_pred_features(img)
    if type(out) == type({}):
        return out["spiga_seg"]

gr=gr.Interface(fn=pred_func, inputs=['image',],
outputs=[gr.Image(label='output').style(height=512)],
examples=example_sample if example_sample else None,
)
gr.launch(share=False)