Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -57,13 +57,14 @@ def inference(img):
|
|
57 |
return Image.fromarray(np.uint8(panoptic_result)).convert('RGB'),Image.fromarray(np.uint8(instance_result)).convert('RGB'),Image.fromarray(np.uint8(semantic_result)).convert('RGB')
|
58 |
|
59 |
|
60 |
-
title = "
|
61 |
-
description = "Gradio demo for
|
62 |
-
|
|
|
63 |
|
64 |
examples = [['Vj17K5z.jpg']]
|
65 |
|
66 |
-
gr.Interface(inference, inputs=gr.inputs.Image(type="filepath"), outputs=[gr.outputs.Image(label="Panoptic segmentation",type="pil"),gr.outputs.Image(label="instance segmentation",type="pil"),gr.outputs.Image(label="semantic segmentation",type="pil")],
|
67 |
description=description,
|
68 |
article=article,
|
69 |
-
examples=examples).launch()
|
|
|
57 |
return Image.fromarray(np.uint8(panoptic_result)).convert('RGB'),Image.fromarray(np.uint8(instance_result)).convert('RGB'),Image.fromarray(np.uint8(semantic_result)).convert('RGB')
|
58 |
|
59 |
|
60 |
+
title = "Mask2Former"
|
61 |
+
description = "Gradio demo for Mask2Former: Masked-attention Mask Transformer for Universal Image Segmentation. To use it, simply upload your image, or click one of the examples to load them. Read more at the links below."
|
62 |
+
|
63 |
+
article = "<p style='text-align: center'><a href='https://arxiv.org/abs/2112.01527' target='_blank'>Masked-attention Mask Transformer for Universal Image Segmentation</a> | <a href='https://github.com/facebookresearch/Mask2Former' target='_blank'>Github Repo</a></p>"
|
64 |
|
65 |
examples = [['Vj17K5z.jpg']]
|
66 |
|
67 |
+
gr.Interface(inference, inputs=gr.inputs.Image(type="filepath"), outputs=[gr.outputs.Image(label="Panoptic segmentation",type="pil"),gr.outputs.Image(label="instance segmentation",type="pil"),gr.outputs.Image(label="semantic segmentation",type="pil")], title=title,
|
68 |
description=description,
|
69 |
article=article,
|
70 |
+
examples=examples).launch(enable_queue=True,cache_examples=True)
|