jschwab21 commited on
Commit
943941c
·
verified ·
1 Parent(s): 9924f7f

Update video_processing.py

Browse files
Files changed (1) hide show
  1. video_processing.py +2 -3
video_processing.py CHANGED
@@ -143,11 +143,10 @@ def analyze_scenes(video_path, scenes, description):
143
 
144
  if best_scene:
145
  print(f"Best Scene: Start={best_scene[1]}, End={best_scene[2]}, Probability={best_scene[0]}, Duration={best_scene[3]}, Sentiments: {best_scene[4]}")
 
146
  else:
147
  print("No suitable scene found")
148
-
149
- return best_scene[1:3] if best_scene else None
150
-
151
 
152
 
153
  def extract_best_scene(video_path, scene):
 
143
 
144
  if best_scene:
145
  print(f"Best Scene: Start={best_scene[1]}, End={best_scene[2]}, Probability={best_scene[0]}, Duration={best_scene[3]}, Sentiments: {best_scene[4]}")
146
+ return (best_scene[1], best_scene[2]), best_scene[4] # Returning a tuple with scene times and sentiments
147
  else:
148
  print("No suitable scene found")
149
+ return None, {}
 
 
150
 
151
 
152
  def extract_best_scene(video_path, scene):