jschwab21 commited on
Commit
ab39c4d
·
verified ·
1 Parent(s): eea176b

Update video_processing.py

Browse files
Files changed (1) hide show
  1. video_processing.py +2 -2
video_processing.py CHANGED
@@ -124,7 +124,7 @@ def process_video(video_input, description, is_url=True):
124
  if is_url:
125
  video_path = download_video(video_input)
126
  else:
127
- video_path = sanitize_filename(video_input)
128
 
129
  scenes = find_scenes(video_path)
130
  best_scene = analyze_scenes(video_path, scenes, description)
@@ -145,7 +145,7 @@ def cleanup_temp_files():
145
  for file in os.listdir(temp_dir):
146
  file_path = os.path.join(temp_dir, file)
147
  try:
148
- if os.path.isfile(file_path):
149
  os.unlink(file_path)
150
  except Exception as e:
151
  print(f"Error: {e}")
 
124
  if is_url:
125
  video_path = download_video(video_input)
126
  else:
127
+ video_path = video_input # Use the uploaded file path directly
128
 
129
  scenes = find_scenes(video_path)
130
  best_scene = analyze_scenes(video_path, scenes, description)
 
145
  for file in os.listdir(temp_dir):
146
  file_path = os.path.join(temp_dir, file)
147
  try:
148
+ if os.path.isfile(file_path)):
149
  os.unlink(file_path)
150
  except Exception as e:
151
  print(f"Error: {e}")