Commit
·
380e80e
1
Parent(s):
bb060ae
Upload conceptual_captions.py with huggingface_hub
Browse files- conceptual_captions.py +2 -1
conceptual_captions.py
CHANGED
|
@@ -14,7 +14,7 @@ _CITATION = '''
|
|
| 14 |
year={2018}
|
| 15 |
}
|
| 16 |
'''
|
| 17 |
-
_DATA_URL = 'https://huggingface.co/datasets/patrickramos/conceptual_captions/blob/main/data/
|
| 18 |
|
| 19 |
class ConceptualCaptions(datasets.GeneratorBasedBuilder):
|
| 20 |
|
|
@@ -46,5 +46,6 @@ class ConceptualCaptions(datasets.GeneratorBasedBuilder):
|
|
| 46 |
.decode('pil')
|
| 47 |
.to_tuple('jpg;png', 'txt')
|
| 48 |
)
|
|
|
|
| 49 |
for i, (image, caption) in enumerate(webdataset):
|
| 50 |
yield i, {'image': image, 'caption': caption}
|
|
|
|
| 14 |
year={2018}
|
| 15 |
}
|
| 16 |
'''
|
| 17 |
+
_DATA_URL = [f'https://huggingface.co/datasets/patrickramos/conceptual_captions/blob/main/data/{str(i).zfill(5)}.tar' for i in range(332)]
|
| 18 |
|
| 19 |
class ConceptualCaptions(datasets.GeneratorBasedBuilder):
|
| 20 |
|
|
|
|
| 46 |
.decode('pil')
|
| 47 |
.to_tuple('jpg;png', 'txt')
|
| 48 |
)
|
| 49 |
+
print(webdataset)
|
| 50 |
for i, (image, caption) in enumerate(webdataset):
|
| 51 |
yield i, {'image': image, 'caption': caption}
|