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