Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -141,9 +141,24 @@ with gr.Blocks() as app:
|
|
141 |
api_input = gr.Textbox(label="Roboflow API Key", type="password")
|
142 |
url_input = gr.Textbox(label="Roboflow Dataset URL (Segmentation)")
|
143 |
run_btn = gr.Button("Convert")
|
144 |
-
|
145 |
-
|
146 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
147 |
|
148 |
if __name__ == "__main__":
|
149 |
app.launch()
|
|
|
141 |
api_input = gr.Textbox(label="Roboflow API Key", type="password")
|
142 |
url_input = gr.Textbox(label="Roboflow Dataset URL (Segmentation)")
|
143 |
run_btn = gr.Button("Convert")
|
144 |
+
|
145 |
+
before_gallery = gr.Gallery(
|
146 |
+
label="Before (Segmentation)",
|
147 |
+
columns=5,
|
148 |
+
height="auto"
|
149 |
+
)
|
150 |
+
|
151 |
+
after_gallery = gr.Gallery(
|
152 |
+
label="After (Bounding Boxes)",
|
153 |
+
columns=5,
|
154 |
+
height="auto"
|
155 |
+
)
|
156 |
+
|
157 |
+
run_btn.click(
|
158 |
+
convert_seg_to_bbox,
|
159 |
+
inputs=[api_input, url_input],
|
160 |
+
outputs=[before_gallery, after_gallery]
|
161 |
+
)
|
162 |
|
163 |
if __name__ == "__main__":
|
164 |
app.launch()
|