Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -58,5 +58,16 @@ def segment_with_legend(input_img):
|
|
58 |
|
59 |
return fig
|
60 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
61 |
if __name__ == "__main__":
|
62 |
demo.launch()
|
|
|
58 |
|
59 |
return fig
|
60 |
|
61 |
+
demo = gr.Interface(
|
62 |
+
fn=segment_with_legend,
|
63 |
+
inputs=gr.Image(type="pil", label="Input Image"),
|
64 |
+
outputs=gr.Plot(label="Segmentation with Legend"),
|
65 |
+
title="ClipSeg MultiClass Demo",
|
66 |
+
description="Upload an image containing pigs, sheep, or horses. The model will segment the animals and colorize them. \
|
67 |
+
<br><br><b>Legend:</b> Red = Pig, Green = Horse, Blue = Sheep."
|
68 |
+
)
|
69 |
+
|
70 |
+
|
71 |
+
|
72 |
if __name__ == "__main__":
|
73 |
demo.launch()
|