Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -32,7 +32,7 @@ def create_text_image(text):
|
|
32 |
font = ImageFont.load_default()
|
33 |
|
34 |
# Calculate text position to center it
|
35 |
-
text_width, text_height =
|
36 |
text_x = (width - text_width) // 2
|
37 |
text_y = (height - text_height) // 2
|
38 |
|
|
|
32 |
font = ImageFont.load_default()
|
33 |
|
34 |
# Calculate text position to center it
|
35 |
+
text_width, text_height = font.getsize(text)
|
36 |
text_x = (width - text_width) // 2
|
37 |
text_y = (height - text_height) // 2
|
38 |
|