Spaces:
Sleeping
Sleeping
Eric P. Nusbaum
commited on
Commit
·
0e2b9ca
1
Parent(s):
9bad826
UI Fixes
Browse files
app.py
CHANGED
@@ -77,7 +77,7 @@ def draw_boxes(image: Image.Image, outputs: dict):
|
|
77 |
|
78 |
# Set label box dimensions
|
79 |
text_width = right - left
|
80 |
-
text_height = (bottom - top) //
|
81 |
|
82 |
# Calculate label background position
|
83 |
label_top = max(top - text_height - 10, 0)
|
|
|
77 |
|
78 |
# Set label box dimensions
|
79 |
text_width = right - left
|
80 |
+
text_height = (bottom - top) // 20 # 5% of the box heights
|
81 |
|
82 |
# Calculate label background position
|
83 |
label_top = max(top - text_height - 10, 0)
|