TIMBOVILL commited on
Commit
b6a7f07
·
verified ·
1 Parent(s): 74076d1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -65,9 +65,10 @@ def process_video(text):
65
  start_time = random.uniform(0, max(0, video.duration - 60))
66
  video = video.subclip(start_time, min(start_time + 60, video.duration))
67
  video = video.resize(height=1920).crop(x1=video.w // 2 - 540, x2=video.w // 2 + 540)
 
68
  text_lines = text.split()
69
  formatted_text = "
70
- ".join([" ".join(text_lines[i:i + 8]) for i in range(0, len(text_lines), 8)])
71
 
72
  text_clip = TextClip(formatted_text, fontsize=70, color='white', size=video.size, method='caption')
73
  text_clip = text_clip.set_position('center').set_duration(video.duration)
 
65
  start_time = random.uniform(0, max(0, video.duration - 60))
66
  video = video.subclip(start_time, min(start_time + 60, video.duration))
67
  video = video.resize(height=1920).crop(x1=video.w // 2 - 540, x2=video.w // 2 + 540)
68
+
69
  text_lines = text.split()
70
  formatted_text = "
71
+ ".join([" ".join(text_lines[i:i + 8]) for i in range(0, len(text_lines), 8)])
72
 
73
  text_clip = TextClip(formatted_text, fontsize=70, color='white', size=video.size, method='caption')
74
  text_clip = text_clip.set_position('center').set_duration(video.duration)