Molbap HF Staff commited on
Commit
8a6b591
·
1 Parent(s): 35a6195

Update fixtures-captioning.py

Browse files
Files changed (1) hide show
  1. fixtures-captioning.py +3 -3
fixtures-captioning.py CHANGED
@@ -43,7 +43,7 @@ class FixturesCaptioning(datasets.GeneratorBasedBuilder):
43
  )
44
  ]
45
  DEFAULT_CONFIG_NAME = "image"
46
- self.ordered_images_list = ["bbox_sample_image.jpeg", "bus.png", "chart.png", "skateboard.png"]
47
  def _info(self):
48
  return datasets.DatasetInfo(
49
  description=_DESCRIPTION,
@@ -61,7 +61,7 @@ class FixturesCaptioning(datasets.GeneratorBasedBuilder):
61
 
62
  DL_URLS = [
63
  f"https://huggingface.co/datasets/hf-internal-testing/fixtures-captioning/raw/main/{name}"
64
- for name in self.ordered_images_list
65
  ]
66
  archive_path = dl_manager.download_and_extract(DL_URLS)
67
  return [
@@ -73,7 +73,7 @@ class FixturesCaptioning(datasets.GeneratorBasedBuilder):
73
  def _generate_examples(self, archive_path):
74
  """Generate examples."""
75
  for i, filename in enumerate(archive_path):
76
- key = self.ordered_images_list[i]
77
  example = {
78
  "id": key,
79
  "file": filename,
 
43
  )
44
  ]
45
  DEFAULT_CONFIG_NAME = "image"
46
+ ORDERED_IMAGES_LIST = ["bbox_sample_image.jpeg", "bus.png", "chart.png", "skateboard.png"]
47
  def _info(self):
48
  return datasets.DatasetInfo(
49
  description=_DESCRIPTION,
 
61
 
62
  DL_URLS = [
63
  f"https://huggingface.co/datasets/hf-internal-testing/fixtures-captioning/raw/main/{name}"
64
+ for name in ORDERED_IMAGES_LIST
65
  ]
66
  archive_path = dl_manager.download_and_extract(DL_URLS)
67
  return [
 
73
  def _generate_examples(self, archive_path):
74
  """Generate examples."""
75
  for i, filename in enumerate(archive_path):
76
+ key = ORDERED_IMAGES_LIST[i]
77
  example = {
78
  "id": key,
79
  "file": filename,