Update pmc_oa.py
Browse files
pmc_oa.py
CHANGED
@@ -28,8 +28,10 @@ _HOMEPAGE = "https://weixionglin.github.io/PMC-CLIP/"
|
|
28 |
|
29 |
_URLs = {
|
30 |
"images": "https://huggingface.co/datasets/axiong/pmc_oa/resolve/main/images.zip",
|
31 |
-
"pmc_oa_beta": "https://huggingface.co/datasets/axiong/pmc_oa/resolve/main/
|
32 |
-
"pmc_oa": "https://huggingface.co/datasets/axiong/pmc_oa/resolve/main/
|
|
|
|
|
33 |
}
|
34 |
|
35 |
|
@@ -127,14 +129,14 @@ class PMC_OA(datasets.GeneratorBasedBuilder):
|
|
127 |
relative_image_path = obj['image']
|
128 |
image_path = os.path.join(image_dir, "caption_T060_filtered_top4_sep_v0_subfigures", relative_image_path)
|
129 |
caption = obj['caption']
|
130 |
-
alignment_type = obj['alignment_type']
|
131 |
-
alignment_score = obj['alignment_score']
|
132 |
yield _id, {
|
133 |
"image": {
|
134 |
"path": image_path,
|
135 |
"bytes": open(image_path, "rb").read(),
|
136 |
},
|
137 |
"caption": caption,
|
138 |
-
"alignment_type": alignment_type,
|
139 |
-
"alignment_score": alignment_score,
|
140 |
}
|
|
|
28 |
|
29 |
_URLs = {
|
30 |
"images": "https://huggingface.co/datasets/axiong/pmc_oa/resolve/main/images.zip",
|
31 |
+
"pmc_oa_beta": "https://huggingface.co/datasets/axiong/pmc_oa/resolve/main/test.jsonl",
|
32 |
+
"pmc_oa": "https://huggingface.co/datasets/axiong/pmc_oa/resolve/main/valid.jsonl",
|
33 |
+
# "pmc_oa_beta": "https://huggingface.co/datasets/axiong/pmc_oa/resolve/main/pmc_oa_beta.jsonl",
|
34 |
+
# "pmc_oa": "https://huggingface.co/datasets/axiong/pmc_oa/resolve/main/pmc_oa.jsonl",
|
35 |
}
|
36 |
|
37 |
|
|
|
129 |
relative_image_path = obj['image']
|
130 |
image_path = os.path.join(image_dir, "caption_T060_filtered_top4_sep_v0_subfigures", relative_image_path)
|
131 |
caption = obj['caption']
|
132 |
+
# alignment_type = obj['alignment_type']
|
133 |
+
# alignment_score = obj['alignment_score']
|
134 |
yield _id, {
|
135 |
"image": {
|
136 |
"path": image_path,
|
137 |
"bytes": open(image_path, "rb").read(),
|
138 |
},
|
139 |
"caption": caption,
|
140 |
+
# "alignment_type": alignment_type,
|
141 |
+
# "alignment_score": alignment_score,
|
142 |
}
|