Xidong commited on
Commit
5ec3651
β€’
1 Parent(s): b40ec9a

Update CMB.py

Browse files
Files changed (1) hide show
  1. CMB.py +2 -2
CMB.py CHANGED
@@ -184,7 +184,7 @@ class CMB(datasets.GeneratorBasedBuilder):
184
 
185
  if self.config.name == 'exam':
186
 
187
- examples = json.loads(io.open(data_file, 'r').read())
188
 
189
  for idx in range(len(examples)):
190
  vals = examples[idx]
@@ -194,7 +194,7 @@ class CMB(datasets.GeneratorBasedBuilder):
194
  yield idx, vals
195
 
196
  if self.config.name == 'clin':
197
- examples = json.loads(io.open(data_file, 'r').read())
198
  for idx in range(len(examples)):
199
  vals = examples[idx]
200
  vals['id'] = vals.get('id',idx)
 
184
 
185
  if self.config.name == 'exam':
186
 
187
+ examples = json.loads(io.open(data_file, 'r', encoding='utf-8').read())
188
 
189
  for idx in range(len(examples)):
190
  vals = examples[idx]
 
194
  yield idx, vals
195
 
196
  if self.config.name == 'clin':
197
+ examples = json.loads(io.open(data_file, 'r', encoding='utf-8').read())
198
  for idx in range(len(examples)):
199
  vals = examples[idx]
200
  vals['id'] = vals.get('id',idx)