arjunanand13 commited on
Commit
d5928d4
1 Parent(s): 0b7f4bd

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -1
app.py CHANGED
@@ -222,7 +222,11 @@ class VideoClassifier:
222
  try:
223
  transcript=self.audio_extraction_chatgptapi(video_input)
224
  except :
225
- transcript=self.audio_extraction_space(video_input)
 
 
 
 
226
  start_time_caption = time.time()
227
  video = cv2.VideoCapture(video_input)
228
  length = int(video.get(cv2.CAP_PROP_FRAME_COUNT))
 
222
  try:
223
  transcript=self.audio_extraction_chatgptapi(video_input)
224
  except :
225
+ print("Chatgpt Key expired , inferencing using whisper library")
226
+ try:
227
+ transcript=self.audio_extraction(video_input)
228
+ except:
229
+ transcript=self.audio_extraction_space(video_input)
230
  start_time_caption = time.time()
231
  video = cv2.VideoCapture(video_input)
232
  length = int(video.get(cv2.CAP_PROP_FRAME_COUNT))