sreepathi-ravikumar commited on
Commit
36e3155
·
verified ·
1 Parent(s): 8bacd57

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -12
app.py CHANGED
@@ -25,18 +25,12 @@ def generate_video():
25
  image_folder = "/tmp/images"
26
  #line=prompts.splitlines()
27
  #asyncio.run(main(line))
28
- lines=[]
29
- words=prompts.split()
30
- word_count=30
31
- for i in range(0,int(len(words)/word_count)):
32
- line=""
33
- for j in range(i*word_count,(i*word_count)+word_count):
34
- line=line+words[j]+" "
35
- lines.append(line)
36
- line=""
37
- for l in range((int(len(words)/word_count))*word_count,len(words)):
38
- line=line+words[l]+" "
39
- lines.append(line)
40
  print(lines)
41
  image_olst=[]
42
  for id in range(len(lines)):
 
25
  image_folder = "/tmp/images"
26
  #line=prompts.splitlines()
27
  #asyncio.run(main(line))
28
+ raw_lines = prompts.splitlines(keepends=False)
29
+ lines = []
30
+
31
+ for i in range(0, len(raw_lines), 5):
32
+ block = '\n'.join(raw_lines[i:i+5])
33
+ lines.append(block)
 
 
 
 
 
 
34
  print(lines)
35
  image_olst=[]
36
  for id in range(len(lines)):