hivecorp commited on
Commit
2c68414
·
verified ·
1 Parent(s): fe7e13c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -81,7 +81,7 @@ def text_to_video(text, voice, rate, pitch, video_width, video_height, bg_color,
81
  lines = page.split("\n")
82
  for j, line in enumerate(lines):
83
  # Calculate y position based on the line index
84
- y_position = (video_height / 2) - ((len(lines) * (text_size + 10)) / 2) + j * (text_size + 10)
85
  draw.text(int(video_width / 2), y_position, line)
86
  draw(img) # Correctly draw the text onto the image
87
  img.format = 'png'
 
81
  lines = page.split("\n")
82
  for j, line in enumerate(lines):
83
  # Calculate y position based on the line index
84
+ y_position = int((video_height / 2) - ((len(lines) * (text_size + 10)) / 2) + j * (text_size + 10))
85
  draw.text(int(video_width / 2), y_position, line)
86
  draw(img) # Correctly draw the text onto the image
87
  img.format = 'png'