Update app.py
Browse files
app.py
CHANGED
@@ -230,12 +230,12 @@ def analyze_video_file(prompt, video_path, chatbot):
|
|
230 |
if len(frames) >= frames_per_chunk:
|
231 |
futures.append(executor.submit(process_clip_from_file, prompt, frames.copy(), chatbot, fps, video_path, chunk))
|
232 |
frames = []
|
233 |
-
chunk
|
234 |
|
235 |
# If any remaining frames that are less than 5 seconds, process them as a final chunk
|
236 |
if len(frames) > 0:
|
237 |
futures.append(executor.submit(process_clip_from_file, prompt, frames.copy(), chatbot, fps, video_path, chunk))
|
238 |
-
chunk
|
239 |
|
240 |
cap.release()
|
241 |
# Yield results as soon as each thread completes
|
|
|
230 |
if len(frames) >= frames_per_chunk:
|
231 |
futures.append(executor.submit(process_clip_from_file, prompt, frames.copy(), chatbot, fps, video_path, chunk))
|
232 |
frames = []
|
233 |
+
chunk+=1
|
234 |
|
235 |
# If any remaining frames that are less than 5 seconds, process them as a final chunk
|
236 |
if len(frames) > 0:
|
237 |
futures.append(executor.submit(process_clip_from_file, prompt, frames.copy(), chatbot, fps, video_path, chunk))
|
238 |
+
chunk+=1
|
239 |
|
240 |
cap.release()
|
241 |
# Yield results as soon as each thread completes
|