axiong commited on
Commit
82d70ac
1 Parent(s): ca4b9ad

Update pmc_oa.py

Browse files
Files changed (1) hide show
  1. pmc_oa.py +2 -3
pmc_oa.py CHANGED
@@ -110,9 +110,8 @@ class PMC_OA(datasets.GeneratorBasedBuilder):
110
  def _generate_examples(self, filepath, image_dir):
111
  """Yields examples."""
112
  logger.info("generating examples from = %s", filepath)
113
-
114
- with open(filepath, encoding="utf-8") as f:
115
- reader = jsonlines.open(f)
116
  for _id, obj in enumerate(reader):
117
  if self.config.name == "pmc_oa_beta":
118
  relative_image_path = obj['image']
 
110
  def _generate_examples(self, filepath, image_dir):
111
  """Yields examples."""
112
  logger.info("generating examples from = %s", filepath)
113
+
114
+ with jsonlines.open(filepath) as reader:
 
115
  for _id, obj in enumerate(reader):
116
  if self.config.name == "pmc_oa_beta":
117
  relative_image_path = obj['image']