wldmr commited on
Commit
161984b
1 Parent(s): 0f5bb97
Files changed (1) hide show
  1. transcript.py +4 -4
transcript.py CHANGED
@@ -106,10 +106,10 @@ def convertToJSON(dsl):
106
  for (key,val) in dsl.items():
107
  image='frame_'+f"{int(cnt):04d}"+'.jpg'
108
  sentence = val
109
- row = '{"Image ID": "'+str(cnt)+'",'
110
- row = row + '"Timestamp": "'+key+'",'
111
- row = row + '"Image": "'+workdir+image+'",'
112
- row = row + '"Caption": "'+sentence+'"},'
113
  json_rows = json_rows + row
114
  cnt = cnt+1
115
  # remove the comma from the last item
 
106
  for (key,val) in dsl.items():
107
  image='frame_'+f"{int(cnt):04d}"+'.jpg'
108
  sentence = val
109
+ row = '{"image_id": "'+str(cnt)+'",'
110
+ row = row + '"timestamp": "'+key+'",'
111
+ row = row + '"image": "'+workdir+image+'",'
112
+ row = row + '"caption": "'+sentence+'"},'
113
  json_rows = json_rows + row
114
  cnt = cnt+1
115
  # remove the comma from the last item