Spaces:
Sleeping
Sleeping
docs: add plurality
Browse files
app.py
CHANGED
|
@@ -53,7 +53,7 @@ def predict(model_choice, annotations: Dict[str, Any]):
|
|
| 53 |
|
| 54 |
return [
|
| 55 |
render_masks(annotations["image"], masks),
|
| 56 |
-
gr.DownloadButton("Download Mask", value="assets/masks.zip", visible=True),
|
| 57 |
]
|
| 58 |
|
| 59 |
|
|
@@ -73,7 +73,7 @@ with gr.Blocks(delete_cache=(30, 30)) as demo:
|
|
| 73 |
|
| 74 |
gr.Markdown(
|
| 75 |
"""
|
| 76 |
-
# 2. Upload your Image and draw
|
| 77 |
"""
|
| 78 |
)
|
| 79 |
|
|
@@ -82,9 +82,9 @@ with gr.Blocks(delete_cache=(30, 30)) as demo:
|
|
| 82 |
disable_edit_boxes=True,
|
| 83 |
label="Draw a bounding box",
|
| 84 |
)
|
| 85 |
-
btn = gr.Button("Get Segmentation Mask")
|
| 86 |
download_btn = gr.DownloadButton(
|
| 87 |
-
"Download Mask", value="assets/masks.zip", visible=False
|
| 88 |
)
|
| 89 |
btn.click(fn=predict, inputs=[model, annotator], outputs=[gr.Plot(), download_btn])
|
| 90 |
|
|
|
|
| 53 |
|
| 54 |
return [
|
| 55 |
render_masks(annotations["image"], masks),
|
| 56 |
+
gr.DownloadButton("Download Mask(s)", value="assets/masks.zip", visible=True),
|
| 57 |
]
|
| 58 |
|
| 59 |
|
|
|
|
| 73 |
|
| 74 |
gr.Markdown(
|
| 75 |
"""
|
| 76 |
+
# 2. Upload your Image and draw bounding box(es)
|
| 77 |
"""
|
| 78 |
)
|
| 79 |
|
|
|
|
| 82 |
disable_edit_boxes=True,
|
| 83 |
label="Draw a bounding box",
|
| 84 |
)
|
| 85 |
+
btn = gr.Button("Get Segmentation Mask(s)")
|
| 86 |
download_btn = gr.DownloadButton(
|
| 87 |
+
"Download Mask(s)", value="assets/masks.zip", visible=False
|
| 88 |
)
|
| 89 |
btn.click(fn=predict, inputs=[model, annotator], outputs=[gr.Plot(), download_btn])
|
| 90 |
|