Update Image-demo.py
Browse files- Image-demo.py +3 -1
Image-demo.py
CHANGED
@@ -1,4 +1,5 @@
|
|
1 |
import datasets
|
|
|
2 |
|
3 |
_CITATION = """\
|
4 |
@InProceedings{huggingface:dataset,
|
@@ -17,7 +18,8 @@ _LICENSE = ""
|
|
17 |
|
18 |
_REPO_URL = "https://huggingface.co/datasets/ppp121386/Image-demo/resolve/main/images.tar.gz"
|
19 |
|
20 |
-
_CAPTION = ["a dog sitting on a bed looking at a pink wall","a brown dog sitting in front of a pink wall","two people are cross country skiing in the snow","a woman is cross country skiing in the snow","a woman is cross country skiing in the snow"]
|
|
|
21 |
|
22 |
class ImageSet(datasets.GeneratorBasedBuilder):
|
23 |
"""Small sample of image-text pairs"""
|
|
|
1 |
import datasets
|
2 |
+
import json
|
3 |
|
4 |
_CITATION = """\
|
5 |
@InProceedings{huggingface:dataset,
|
|
|
18 |
|
19 |
_REPO_URL = "https://huggingface.co/datasets/ppp121386/Image-demo/resolve/main/images.tar.gz"
|
20 |
|
21 |
+
# _CAPTION = ["a dog sitting on a bed looking at a pink wall","a brown dog sitting in front of a pink wall","two people are cross country skiing in the snow","a woman is cross country skiing in the snow","a woman is cross country skiing in the snow"]
|
22 |
+
_CAPTION = json.load(open("caption.json", 'r'))
|
23 |
|
24 |
class ImageSet(datasets.GeneratorBasedBuilder):
|
25 |
"""Small sample of image-text pairs"""
|