Spaces:
Paused
Paused
Update app_parallel.py
Browse files- app_parallel.py +2 -2
app_parallel.py
CHANGED
@@ -363,8 +363,8 @@ def parallel_processing():
|
|
363 |
def stream_results():
|
364 |
global future_to_chunk
|
365 |
def generate():
|
366 |
-
for future in as_completed(
|
367 |
-
idx =
|
368 |
try:
|
369 |
base64_video, temp_file_path = future.result()
|
370 |
yield json.dumps({'start_time': idx, 'path': temp_file_path}).encode('utf-8')
|
|
|
363 |
def stream_results():
|
364 |
global future_to_chunk
|
365 |
def generate():
|
366 |
+
for future in as_completed(future_to_chunk):
|
367 |
+
idx = future_to_chunk[future]
|
368 |
try:
|
369 |
base64_video, temp_file_path = future.result()
|
370 |
yield json.dumps({'start_time': idx, 'path': temp_file_path}).encode('utf-8')
|