Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -84,7 +84,7 @@ def process_image(image, text):
|
|
| 84 |
lines.append(current_line)
|
| 85 |
|
| 86 |
# Draw each line of text within the bounding box
|
| 87 |
-
line_height = font.
|
| 88 |
total_text_height = len(lines) * line_height
|
| 89 |
|
| 90 |
if total_text_height > box_height:
|
|
|
|
| 84 |
lines.append(current_line)
|
| 85 |
|
| 86 |
# Draw each line of text within the bounding box
|
| 87 |
+
line_height = text_draw.textbbox((0, 0), "Hg", font=font)[3] - text_draw.textbbox((0, 0), "Hg", font=font)[1]
|
| 88 |
total_text_height = len(lines) * line_height
|
| 89 |
|
| 90 |
if total_text_height > box_height:
|