dmrau commited on
Commit
1cad10c
1 Parent(s): 0f7881c

Update README.md

Browse files

The code breaks because it is trying to assign the new key `original_answer` to `outputs` which is a list. Instead the original answer can be written to the first element of the outputs list.

Files changed (1) hide show
  1. README.md +1 -1
README.md CHANGED
@@ -1182,7 +1182,7 @@ triviaqa_map = {}
1182
  def add_missing_data(x, trivia_qa_subset, triviaqa_map):
1183
  i = triviaqa_map[x['id']]
1184
  x['input'] = trivia_qa_subset[i]['question']
1185
- x['output']['original_answer'] = trivia_qa_subset[i]['answer']['value']
1186
  return x
1187
 
1188
  for k in ['train', 'validation', 'test']:
 
1182
  def add_missing_data(x, trivia_qa_subset, triviaqa_map):
1183
  i = triviaqa_map[x['id']]
1184
  x['input'] = trivia_qa_subset[i]['question']
1185
+ x['output'][0]['original_answer'] = trivia_qa_subset[i]['answer']['value']
1186
  return x
1187
 
1188
  for k in ['train', 'validation', 'test']: