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

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
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 > 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
 
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 > 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 (>90%). Please reduce the video resolution or frame rate.")
98
  break