Spaces:
Running
Running
Commit
•
8d1c21c
1
Parent(s):
86e6672
improve heights
Browse files
app.py
CHANGED
@@ -124,7 +124,7 @@ def viz_pred_mask(img, mask=None, point_coords=None, point_labels=None, bbox_coo
|
|
124 |
for i in range(len(bbox_coords)//2):
|
125 |
cv2.rectangle(out, bbox_coords[2*i], bbox_coords[2*i+1], (255,165,0), marker_size)
|
126 |
if len(bbox_coords) % 2 == 1:
|
127 |
-
cv2.circle(out, tuple(bbox_coords[-1]),
|
128 |
|
129 |
return out.astype(np.uint8)
|
130 |
|
@@ -411,6 +411,7 @@ with gr.Blocks(theme=gr.themes.Default(text_size=gr.themes.sizes.text_lg)) as de
|
|
411 |
label="Input",
|
412 |
image_mode="L",
|
413 |
value=default_example,
|
|
|
414 |
# height=display_height
|
415 |
)
|
416 |
gr.Markdown("To upload your own image: click the `x` in the top right corner to clear the current image, then drag & drop")
|
@@ -423,7 +424,8 @@ with gr.Blocks(theme=gr.themes.Default(text_size=gr.themes.sizes.text_lg)) as de
|
|
423 |
elem_id="gallery",
|
424 |
preview=True,
|
425 |
object_fit="scale-down",
|
426 |
-
# height=display_height
|
|
|
427 |
)
|
428 |
|
429 |
submit_button = gr.Button("Refresh Prediction", variant='primary')
|
|
|
124 |
for i in range(len(bbox_coords)//2):
|
125 |
cv2.rectangle(out, bbox_coords[2*i], bbox_coords[2*i+1], (255,165,0), marker_size)
|
126 |
if len(bbox_coords) % 2 == 1:
|
127 |
+
cv2.circle(out, tuple(bbox_coords[-1]), marker_size, (255,165,0), -1)
|
128 |
|
129 |
return out.astype(np.uint8)
|
130 |
|
|
|
411 |
label="Input",
|
412 |
image_mode="L",
|
413 |
value=default_example,
|
414 |
+
container=True
|
415 |
# height=display_height
|
416 |
)
|
417 |
gr.Markdown("To upload your own image: click the `x` in the top right corner to clear the current image, then drag & drop")
|
|
|
424 |
elem_id="gallery",
|
425 |
preview=True,
|
426 |
object_fit="scale-down",
|
427 |
+
# height=display_height,
|
428 |
+
container=True
|
429 |
)
|
430 |
|
431 |
submit_button = gr.Button("Refresh Prediction", variant='primary')
|