awacke1 commited on
Commit
575d370
1 Parent(s): a57e75b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -358,7 +358,7 @@ def save_video(video_file):
358
  f.write(video_file.getbuffer())
359
  return video_file.name
360
 
361
- def process_video(video_input, user_prompt):
362
  SaveNewFile=True
363
  video_file_name=''
364
  if isinstance(video_input, str):
@@ -420,7 +420,7 @@ def process_video(video_input, user_prompt):
420
 
421
  return video_response
422
 
423
- def process_video_old(video_path, seconds_per_frame=2):
424
  base64Frames = []
425
  base_video_path, _ = os.path.splitext(video_path)
426
  video = cv2.VideoCapture(video_path)
@@ -465,7 +465,7 @@ def process_audio_and_video(video_input):
465
  video_path = save_video(video_input )
466
 
467
  # Process the saved video
468
- base64Frames, audio_path = process_video(video_path, seconds_per_frame=1)
469
 
470
  # Get the transcript for the video model call
471
  transcript = process_audio_for_video(video_input)
 
358
  f.write(video_file.getbuffer())
359
  return video_file.name
360
 
361
+ def process_video_broke(video_input, user_prompt):
362
  SaveNewFile=True
363
  video_file_name=''
364
  if isinstance(video_input, str):
 
420
 
421
  return video_response
422
 
423
+ def process_video(video_path, seconds_per_frame=2):
424
  base64Frames = []
425
  base_video_path, _ = os.path.splitext(video_path)
426
  video = cv2.VideoCapture(video_path)
 
465
  video_path = save_video(video_input )
466
 
467
  # Process the saved video
468
+ base64Frames, audio_path = process_video(video_path)
469
 
470
  # Get the transcript for the video model call
471
  transcript = process_audio_for_video(video_input)