Dodon commited on
Commit
347614e
·
1 Parent(s): 4bbdb40

Update PlotQA_dataset.py

Browse files
Files changed (1) hide show
  1. PlotQA_dataset.py +2 -2
PlotQA_dataset.py CHANGED
@@ -157,8 +157,8 @@ class PlotQA(datasets.GeneratorBasedBuilder):
157
  #returns the examples in the raw in json file
158
  for idx in range(0,len(data['qa_pairs'])-1):
159
  item = copy.deepcopy(data['qa_pairs'][idx])
160
- item["imgname"] = item["image_index"]
161
- item["image"] = os.path.join('./imgs',str(item["imgname"])) + '.png'
162
  item["query_token"] = []
163
  item["query"] = item["question_string"]
164
  item["label"] = item["answer"]
 
157
  #returns the examples in the raw in json file
158
  for idx in range(0,len(data['qa_pairs'])-1):
159
  item = copy.deepcopy(data['qa_pairs'][idx])
160
+ item["imgname"] = item["image_index"]+'.png'
161
+ item["image"] = os.path.join('./imgs',str(item["imgname"]))
162
  item["query_token"] = []
163
  item["query"] = item["question_string"]
164
  item["label"] = item["answer"]