Spaces:
Runtime error
Runtime error
Update
Browse files
app.py
CHANGED
@@ -160,16 +160,16 @@ def extract_images_and_embeds(video_id, video_path, subtitles, output, expanded=
|
|
160 |
'frame_no': frame_no
|
161 |
})
|
162 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
163 |
else:
|
164 |
break
|
165 |
|
166 |
-
encoding = processor(image, text, return_tensors="pt").to(device)
|
167 |
-
encoding['text'] = text
|
168 |
-
encoding['image_filepath'] = img_fpath
|
169 |
-
encoding['start_time'] = caption.start
|
170 |
-
|
171 |
-
batch_list.append(encoding)
|
172 |
-
|
173 |
if len(batch_list) == batch_size:
|
174 |
batch = collate_fn(batch_list)
|
175 |
with torch.no_grad():
|
|
|
160 |
'frame_no': frame_no
|
161 |
})
|
162 |
|
163 |
+
encoding = processor(image, text, return_tensors="pt").to(device)
|
164 |
+
encoding['text'] = text
|
165 |
+
encoding['image_filepath'] = img_fpath
|
166 |
+
encoding['start_time'] = caption.start
|
167 |
+
|
168 |
+
batch_list.append(encoding)
|
169 |
+
|
170 |
else:
|
171 |
break
|
172 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
173 |
if len(batch_list) == batch_size:
|
174 |
batch = collate_fn(batch_list)
|
175 |
with torch.no_grad():
|