Datasets:
Update index.py
Browse files
index.py
CHANGED
|
@@ -19,7 +19,7 @@ _CITATION = "TODO"
|
|
| 19 |
# ===============================
|
| 20 |
|
| 21 |
_FEATURES = datasets.Features({
|
| 22 |
-
"
|
| 23 |
"text": datasets.Value("string"), # Solo texto
|
| 24 |
})
|
| 25 |
|
|
@@ -79,7 +79,7 @@ class ExteriorAI(datasets.GeneratorBasedBuilder):
|
|
| 79 |
for _, row in metadata.iterrows():
|
| 80 |
text = row["text"]
|
| 81 |
|
| 82 |
-
image_path = row["
|
| 83 |
image_path = os.path.join(images_dir, image_path)
|
| 84 |
image = open(image_path, "rb").read()
|
| 85 |
|
|
|
|
| 19 |
# ===============================
|
| 20 |
|
| 21 |
_FEATURES = datasets.Features({
|
| 22 |
+
"file_name": datasets.Image(), # Solo imagen
|
| 23 |
"text": datasets.Value("string"), # Solo texto
|
| 24 |
})
|
| 25 |
|
|
|
|
| 79 |
for _, row in metadata.iterrows():
|
| 80 |
text = row["text"]
|
| 81 |
|
| 82 |
+
image_path = row["file_name"]
|
| 83 |
image_path = os.path.join(images_dir, image_path)
|
| 84 |
image = open(image_path, "rb").read()
|
| 85 |
|