jherng commited on
Commit
9a955f9
1 Parent(s): 851929c

Update xd-violence.py

Browse files
Files changed (1) hide show
  1. xd-violence.py +1 -1
xd-violence.py CHANGED
@@ -286,7 +286,7 @@ class XDViolence(datasets.GeneratorBasedBuilder):
286
  id2frame_annotation[id] = frame_annotation
287
 
288
  file_list["frame_annotations"] = file_list["id"].apply(
289
- lambda x: id2frame_annotation[x] if x in id2frame_annotation else None
290
  )
291
 
292
  return file_list.to_dict("records")
 
286
  id2frame_annotation[id] = frame_annotation
287
 
288
  file_list["frame_annotations"] = file_list["id"].apply(
289
+ lambda x: id2frame_annotation[x] if x in id2frame_annotation else []
290
  )
291
 
292
  return file_list.to_dict("records")