rvorias commited on
Commit
07fcfbe
1 Parent(s): d33c309

update with new images

Browse files
Files changed (3) hide show
  1. data/images_001.zip +2 -2
  2. metadata.json +2 -2
  3. 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:b96fdea763d54939fbd8de3936ababd9fada7569a735f5b39b6dbbdbb27f98b5
3
- size 177930282
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:c5f4130f05744481cdf6a52a835413cdd6c3a469c5c489f6a2ab03875800b047
3
- size 89974
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": sample["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"),