hivecorp commited on
Commit
ed0d188
·
verified ·
1 Parent(s): 0b1b63b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -7
app.py CHANGED
@@ -81,13 +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
  draw.text(int(video_width / 2), (j + 1) * (text_size + 10), line)
84
-
85
- from PIL import ImageDraw
86
-
87
- # Assuming 'img' is an instance of a PIL Image object
88
- draw = ImageDraw.Draw(img) # Create a drawing object
89
- # Now you can use 'draw' to draw on 'img'
90
-
91
  img.format = 'png'
92
  img_path = os.path.join(tempfile.gettempdir(), f"page_{i}.png")
93
  img.save(filename=img_path)
 
81
  lines = page.split("\n")
82
  for j, line in enumerate(lines):
83
  draw.text(int(video_width / 2), (j + 1) * (text_size + 10), line)
84
+ img.draw(draw)
 
 
 
 
 
 
85
  img.format = 'png'
86
  img_path = os.path.join(tempfile.gettempdir(), f"page_{i}.png")
87
  img.save(filename=img_path)