svjack's picture
Update app.py
2c0a276
raw
history blame contribute delete
407 Bytes
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)