watchtowerss commited on
Commit
e2de6b4
·
1 Parent(s): 2bafa70

update the max memory usage to 70%

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -92,8 +92,8 @@ 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 > 90:
96
- operation_log = [("Memory usage is too high (>90%). Stop the video extraction. Please reduce the video resolution or frame rate.", "Error")]
97
  print("Memory usage is too high (>90%). Please reduce the video resolution or frame rate.")
98
  break
99
  else:
 
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.", "Error")]
97
  print("Memory usage is too high (>90%). Please reduce the video resolution or frame rate.")
98
  break
99
  else: