amirgame197 commited on
Commit
3c4c507
·
verified ·
1 Parent(s): 3ba8a2d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -0
app.py CHANGED
@@ -36,8 +36,10 @@ def doo(video):
36
 
37
  # Release GPU memory after processing a certain number of frames
38
  if processed_frames % 100 == 0:
 
39
  del out # Delete the variable holding the processed frame
40
  gc.collect() # Perform manual garbage collection to release GPU memory
 
41
 
42
  cap.release()
43
  writer.release()
 
36
 
37
  # Release GPU memory after processing a certain number of frames
38
  if processed_frames % 100 == 0:
39
+ processed_frames = 0
40
  del out # Delete the variable holding the processed frame
41
  gc.collect() # Perform manual garbage collection to release GPU memory
42
+ print("Memory reset")
43
 
44
  cap.release()
45
  writer.release()