deploy: batch update 1 file(s)
Browse files
report_generation/data_collector.py
CHANGED
|
@@ -320,7 +320,11 @@ class DataCollector:
|
|
| 320 |
for cap_doc in self.db.video_captions.find({'video_id': video_id}):
|
| 321 |
fid = cap_doc.get('frame_id') or cap_doc.get('frame_number')
|
| 322 |
if fid is not None:
|
| 323 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 324 |
except Exception as cap_err:
|
| 325 |
logger.warning(f"Could not load captions for keyframe merge: {cap_err}")
|
| 326 |
|
|
|
|
| 320 |
for cap_doc in self.db.video_captions.find({'video_id': video_id}):
|
| 321 |
fid = cap_doc.get('frame_id') or cap_doc.get('frame_number')
|
| 322 |
if fid is not None:
|
| 323 |
+
# Caption field is 'sanitized_caption' (fallback to 'raw_caption')
|
| 324 |
+
caption_text = (cap_doc.get('sanitized_caption')
|
| 325 |
+
or cap_doc.get('raw_caption')
|
| 326 |
+
or cap_doc.get('caption', ''))
|
| 327 |
+
caption_map[str(fid)] = caption_text
|
| 328 |
except Exception as cap_err:
|
| 329 |
logger.warning(f"Could not load captions for keyframe merge: {cap_err}")
|
| 330 |
|