adiv07 commited on
Commit
8d55ff4
·
verified ·
1 Parent(s): cc3c9e6

Update Gpt4oDemo.py

Browse files
Files changed (1) hide show
  1. Gpt4oDemo.py +3 -3
Gpt4oDemo.py CHANGED
@@ -135,7 +135,7 @@ def process_video(video_path, seconds_per_frame=2, target_width=320, target_heig
135
  video.release()
136
 
137
  # Extract audio from video
138
- audio_path = f"./Task 1.mp3"
139
  clip = VideoFileClip(video_path)
140
  clip.audio.write_audiofile(audio_path, bitrate="32k")
141
  clip.audio.close()
@@ -190,7 +190,7 @@ def transcribe_video(audio_path):
190
  transcript += "start: " + str(int(res["start"])) + "\n"
191
  transcript += "end: " + str(int(res["end"])) + "\n"
192
  transcript += "\n"
193
-
194
  return transcript
195
 
196
 
@@ -199,7 +199,7 @@ def handle_video(video=None):
199
 
200
  if video is None:
201
  # Load example video
202
- video = "./Task 1.mp4"
203
 
204
  base64Frames, audio_path = process_video(video, seconds_per_frame=1, target_width=320, target_height=180)
205
  chat_history.append({
 
135
  video.release()
136
 
137
  # Extract audio from video
138
+ audio_path = f"./TEST.mp3"
139
  clip = VideoFileClip(video_path)
140
  clip.audio.write_audiofile(audio_path, bitrate="32k")
141
  clip.audio.close()
 
190
  transcript += "start: " + str(int(res["start"])) + "\n"
191
  transcript += "end: " + str(int(res["end"])) + "\n"
192
  transcript += "\n"
193
+ print(transcript)
194
  return transcript
195
 
196
 
 
199
 
200
  if video is None:
201
  # Load example video
202
+ video = "./TEST.mp4"
203
 
204
  base64Frames, audio_path = process_video(video, seconds_per_frame=1, target_width=320, target_height=180)
205
  chat_history.append({