arjunanand13 commited on
Commit
e19100d
·
verified ·
1 Parent(s): a0df959

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -102,7 +102,7 @@ class VideoClassifier:
102
  time_taken_1 = round(end - start, 3)
103
  # print("Time taken from video to transcript:", time_taken_1)
104
 
105
- path = './frames'
106
  if not os.path.exists(path):
107
  os.mkdir(path)
108
  video = cv2.VideoCapture(video_input)
@@ -119,12 +119,12 @@ class VideoClassifier:
119
  ret,frame = video.read()
120
  if ret:
121
  # if video is still left continue creating images
122
- name = './frames/frame' + str(currentframe) + '.jpg'
123
  # writing the extracted images
124
  # print ('Creating...' + name)
125
  cv2.imwrite(name, frame)
126
  image_paths = []
127
- img_path = '/frames/frame' + str(currentframe) + '.jpg'
128
  image_paths.append(img_path)
129
  content = self.img_cap.predict_step(image_paths)
130
  print("content",content)
 
102
  time_taken_1 = round(end - start, 3)
103
  # print("Time taken from video to transcript:", time_taken_1)
104
 
105
+ path = './results/frames'
106
  if not os.path.exists(path):
107
  os.mkdir(path)
108
  video = cv2.VideoCapture(video_input)
 
119
  ret,frame = video.read()
120
  if ret:
121
  # if video is still left continue creating images
122
+ name = './results/frames/frame' + str(currentframe) + '.jpg'
123
  # writing the extracted images
124
  # print ('Creating...' + name)
125
  cv2.imwrite(name, frame)
126
  image_paths = []
127
+ img_path = '/results/frames/frame' + str(currentframe) + '.jpg'
128
  image_paths.append(img_path)
129
  content = self.img_cap.predict_step(image_paths)
130
  print("content",content)