Datasets:
update with new images
Browse files- data/images_001.zip +2 -2
- metadata.json +2 -2
- realms_adventurers.py +5 -1
data/images_001.zip
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:c7c750800f66e1b0bb0fd1a6fe0e558ce6921f369ec75350a09ece26b5f7f3f3
|
3 |
+
size 1225778440
|
metadata.json
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:dd44da224d1a4b5e4bcde1497f75111ba05f76e3f1355b55ff6ccb02223d4225
|
3 |
+
size 988262
|
realms_adventurers.py
CHANGED
@@ -104,10 +104,14 @@ class RealmsAdventurersDataset(datasets.GeneratorBasedBuilder):
|
|
104 |
data = json.load(f)
|
105 |
for sample in data:
|
106 |
image_path = os.path.join(root_dir, sample["file_name"])
|
|
|
|
|
|
|
|
|
107 |
with open(image_path, "rb") as file_obj:
|
108 |
yield image_path, {
|
109 |
"image": {"path": image_path, "bytes": file_obj.read()},
|
110 |
-
"caption":
|
111 |
"components": {
|
112 |
"sex": sample.get("sex"),
|
113 |
"race": sample.get("race"),
|
|
|
104 |
data = json.load(f)
|
105 |
for sample in data:
|
106 |
image_path = os.path.join(root_dir, sample["file_name"])
|
107 |
+
if "caption" in sample:
|
108 |
+
caption = sample["caption"]
|
109 |
+
else:
|
110 |
+
caption = sample["discord_prompt"]
|
111 |
with open(image_path, "rb") as file_obj:
|
112 |
yield image_path, {
|
113 |
"image": {"path": image_path, "bytes": file_obj.read()},
|
114 |
+
"caption": caption,
|
115 |
"components": {
|
116 |
"sex": sample.get("sex"),
|
117 |
"race": sample.get("race"),
|