svjack's picture
Upload 4 files
c247df2
raw
history blame
397 Bytes
import gradio as gr
from pred_color import
example_sample = [
"babyxiang_ai.png"
]
def pred_func(img):
out = single_pred_features(img)
if type(out) == type({}):
return out["spiga_seg"]
gr=gradio.Interface(fn=pred_func, inputs=['image',],
outputs=[gradio.Image(label='output').style(height=512)],
examples=example_sample if example_sample else None,
)
gr.launch(share=False)