sreepathi-ravikumar commited on
Commit
6b8f746
·
verified ·
1 Parent(s): b8e8579

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -8
app.py CHANGED
@@ -141,14 +141,14 @@ def generate_video():
141
  raise Exception(f"Error from Space B: {response.text}")
142
 
143
  with ThreadPoolExecutor(max_workers=10) as executor:
144
- for id, line in enumerate(lines):
145
- url = space_b_urls[id % len(space_b_urls)] # reuse if more lines than URLs
146
- futures.append(executor.submit(send_request_to_space, id, lines, url))
147
-
148
- for future in as_completed(futures):
149
- result = future.result()
150
- if result:
151
- video_paths.append(result)
152
 
153
  video_path = video_com(lines)
154
  #for img in image_files:
 
141
  raise Exception(f"Error from Space B: {response.text}")
142
 
143
  with ThreadPoolExecutor(max_workers=10) as executor:
144
+ for id, line in enumerate(lines):
145
+ url = space_b_urls[id % len(space_b_urls)] # reuse if more lines than URLs
146
+ futures.append(executor.submit(send_request_to_space, id, lines, url))
147
+
148
+ for future in as_completed(futures):
149
+ result = future.result()
150
+ if result:
151
+ video_paths.append(result)
152
 
153
  video_path = video_com(lines)
154
  #for img in image_files: