Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -50,7 +50,7 @@ def extract_frames_parallel(video_path, interval=2.0):
|
|
| 50 |
|
| 51 |
frames = []
|
| 52 |
# Параллельное извлечение кадров
|
| 53 |
-
with concurrent.futures.ThreadPoolExecutor() as executor:
|
| 54 |
results = executor.map(lambda idx: extract_frame_at(video_path, idx), frame_indices)
|
| 55 |
for frame in results:
|
| 56 |
if frame is not None:
|
|
|
|
| 50 |
|
| 51 |
frames = []
|
| 52 |
# Параллельное извлечение кадров
|
| 53 |
+
with concurrent.futures.ThreadPoolExecutor(max_workers=8) as executor:
|
| 54 |
results = executor.map(lambda idx: extract_frame_at(video_path, idx), frame_indices)
|
| 55 |
for frame in results:
|
| 56 |
if frame is not None:
|