Spaces:
Paused
Paused
Update app_celery.py
Browse files- app_celery.py +3 -1
app_celery.py
CHANGED
@@ -548,8 +548,10 @@ def stream_video_chunks():
|
|
548 |
video_chunk_path = task.get() # Wait for each task to complete
|
549 |
video_chunk_paths.append(video_chunk_path)
|
550 |
print("video_chunk_paths",video_chunk_paths)
|
551 |
-
yield f'data: {video_chunk_path}\n\n'
|
552 |
print(f"Chunk {index} generated and sent: {video_chunk_path}")
|
|
|
|
|
553 |
except Exception as e:
|
554 |
print(f"Error while fetching task result: {str(e)}")
|
555 |
yield f'data: error\n\n'
|
|
|
548 |
video_chunk_path = task.get() # Wait for each task to complete
|
549 |
video_chunk_paths.append(video_chunk_path)
|
550 |
print("video_chunk_paths",video_chunk_paths)
|
551 |
+
yield f'data: {video_chunk_path}\n\n'
|
552 |
print(f"Chunk {index} generated and sent: {video_chunk_path}")
|
553 |
+
os.remove(video_chunk_path)
|
554 |
+
print(f"Deleted video chunk: {video_chunk_path}")
|
555 |
except Exception as e:
|
556 |
print(f"Error while fetching task result: {str(e)}")
|
557 |
yield f'data: error\n\n'
|