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