Datasets:
Update load_script.py
Browse files- load_script.py +3 -4
load_script.py
CHANGED
@@ -15,8 +15,7 @@ _HOMEPAGE = "https://huggingface.co/datasets/Riksarkivet/test_images_demo"
|
|
15 |
|
16 |
_LICENSE = ""
|
17 |
|
18 |
-
_REPO = "https://huggingface.co/datasets/Riksarkivet/test_images_demo
|
19 |
-
_METADATA_URL = "https://huggingface.co/datasets/Riksarkivet/test_images_demo/raw/main/images.txt"
|
20 |
|
21 |
class ExampleImages(datasets.GeneratorBasedBuilder):
|
22 |
"""Small sample of image-text pairs"""
|
@@ -36,8 +35,8 @@ class ExampleImages(datasets.GeneratorBasedBuilder):
|
|
36 |
)
|
37 |
|
38 |
def _split_generators(self, dl_manager):
|
39 |
-
images_archive = dl_manager.download(_REPO)
|
40 |
-
metadata_path = dl_manager.download(
|
41 |
image_iters = dl_manager.iter_archive(images_archive)
|
42 |
return [
|
43 |
datasets.SplitGenerator(
|
|
|
15 |
|
16 |
_LICENSE = ""
|
17 |
|
18 |
+
_REPO = "https://huggingface.co/datasets/Riksarkivet/test_images_demo"
|
|
|
19 |
|
20 |
class ExampleImages(datasets.GeneratorBasedBuilder):
|
21 |
"""Small sample of image-text pairs"""
|
|
|
35 |
)
|
36 |
|
37 |
def _split_generators(self, dl_manager):
|
38 |
+
images_archive = dl_manager.download(f"{_REPO}/resolve/main/images.tgz")
|
39 |
+
metadata_path = dl_manager.download(f"{_REPO}/resolve/main/images.txt")
|
40 |
image_iters = dl_manager.iter_archive(images_archive)
|
41 |
return [
|
42 |
datasets.SplitGenerator(
|