arjunanand13 commited on
Commit
c6faaf8
1 Parent(s): b1f8974

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -231,9 +231,8 @@ class VideoClassifier:
231
  # transcript=self.audio_extraction(video_input)
232
  # except:
233
  # transcript=self.audio_extraction_space(video_input)
234
-
235
  if checkbox=="Image Captions":
236
- start_time_caption = time.time()
237
  video = cv2.VideoCapture(video_input)
238
  length = int(video.get(cv2.CAP_PROP_FRAME_COUNT))
239
  no_of_frame = int(self.no_of_frames)
@@ -258,11 +257,12 @@ class VideoClassifier:
258
  print("CAPTIONS", captions)
259
  video.release()
260
  cv2.destroyAllWindows()
261
- end_time_caption = time.time()
262
- caption_time=end_time_caption-start_time_caption
263
  # print("TIME TAKEN FOR IMAGE CAPTIONING", end_time_caption-start_time_caption)
264
  else:
265
- caption=""
 
 
266
  start_time_generation = time.time()
267
  main_categories = Path("main_classes.txt").read_text()
268
  main_categories_list = ['Automotive', 'Books and Literature', 'Business and Finance', 'Careers', 'Education','Family and Relationships',
 
231
  # transcript=self.audio_extraction(video_input)
232
  # except:
233
  # transcript=self.audio_extraction_space(video_input)
234
+ start_time_caption = time.time()
235
  if checkbox=="Image Captions":
 
236
  video = cv2.VideoCapture(video_input)
237
  length = int(video.get(cv2.CAP_PROP_FRAME_COUNT))
238
  no_of_frame = int(self.no_of_frames)
 
257
  print("CAPTIONS", captions)
258
  video.release()
259
  cv2.destroyAllWindows()
260
+
 
261
  # print("TIME TAKEN FOR IMAGE CAPTIONING", end_time_caption-start_time_caption)
262
  else:
263
+ captions=""
264
+ end_time_caption = time.time()
265
+ caption_time=end_time_caption-start_time_caption
266
  start_time_generation = time.time()
267
  main_categories = Path("main_classes.txt").read_text()
268
  main_categories_list = ['Automotive', 'Books and Literature', 'Business and Finance', 'Careers', 'Education','Family and Relationships',