umarabbas890 commited on
Commit
385fe2e
·
verified ·
1 Parent(s): c3ca057

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
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 = draw.textsize(text, font=font)
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