Spaces:
Runtime error
Runtime error
watchtowerss
commited on
Commit
·
98d86dc
1
Parent(s):
8aa7107
Update app.py
Browse files
app.py
CHANGED
@@ -92,7 +92,7 @@ def get_frames_from_video(video_input, video_state):
|
|
92 |
if ret == True:
|
93 |
current_memory_usage = psutil.virtual_memory().percent
|
94 |
frames.append(cv2.cvtColor(frame, cv2.COLOR_BGR2RGB))
|
95 |
-
if current_memory_usage >
|
96 |
operation_log = [("Memory usage is too high (>70%). Stop the video extraction. Please reduce the video resolution or frame rate or wait for other users to complete the operation.", "Error")]
|
97 |
print("Memory usage is too high (>50%). Please reduce the video resolution or frame rate.")
|
98 |
break
|
|
|
92 |
if ret == True:
|
93 |
current_memory_usage = psutil.virtual_memory().percent
|
94 |
frames.append(cv2.cvtColor(frame, cv2.COLOR_BGR2RGB))
|
95 |
+
if current_memory_usage > 70:
|
96 |
operation_log = [("Memory usage is too high (>70%). Stop the video extraction. Please reduce the video resolution or frame rate or wait for other users to complete the operation.", "Error")]
|
97 |
print("Memory usage is too high (>50%). Please reduce the video resolution or frame rate.")
|
98 |
break
|