ghostsInTheMachine commited on
Commit
1df36ae
1 Parent(s): e1b6fad

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -92,15 +92,15 @@ def process_frame(frame, seed=0):
92
  return None
93
 
94
  @spaces.GPU
95
- def process_video(video_path, fps=0, seed=0, max_workers=4):
96
  """
97
  Process video to create depth map sequence and video.
98
  Maintains original resolution and framerate if fps=0.
99
  """
100
  temp_dir = None
101
  try:
102
- start_time = time.time()
103
- video = mp.VideoFileClip(video_path)
104
 
105
  # Use original video FPS if not specified
106
  if fps == 0:
 
92
  return None
93
 
94
  @spaces.GPU
95
+ def process_video(video_path, fps=0, seed=0, max_workers=2): # Reduced max_workers
96
  """
97
  Process video to create depth map sequence and video.
98
  Maintains original resolution and framerate if fps=0.
99
  """
100
  temp_dir = None
101
  try:
102
+ # Preprocess the video
103
+ video = preprocess_video(video_path)
104
 
105
  # Use original video FPS if not specified
106
  if fps == 0: