Update renovation.py
Browse files- renovation.py +4 -4
renovation.py
CHANGED
@@ -40,13 +40,13 @@ class RenovationQualityDataset(datasets.GeneratorBasedBuilder):
|
|
40 |
{
|
41 |
"image_file_path": datasets.Value("string"),
|
42 |
"image": datasets.Image(),
|
43 |
-
"
|
44 |
}
|
45 |
),
|
46 |
-
supervised_keys=("image", "
|
47 |
homepage=_HOMEPAGE,
|
48 |
citation=_CITATION,
|
49 |
-
task_templates=[ImageClassification(image_column="image", label_column="
|
50 |
)
|
51 |
|
52 |
def _split_generators(self, dl_manager):
|
@@ -101,5 +101,5 @@ class RenovationQualityDataset(datasets.GeneratorBasedBuilder):
|
|
101 |
yield id_, {
|
102 |
'image_file_path': image_file_path,
|
103 |
'image': image,
|
104 |
-
'
|
105 |
}
|
|
|
40 |
{
|
41 |
"image_file_path": datasets.Value("string"),
|
42 |
"image": datasets.Image(),
|
43 |
+
"labels": datasets.features.ClassLabel(names=_NAMES),
|
44 |
}
|
45 |
),
|
46 |
+
supervised_keys=("image", "labels"),
|
47 |
homepage=_HOMEPAGE,
|
48 |
citation=_CITATION,
|
49 |
+
task_templates=[ImageClassification(image_column="image", label_column="labels")],
|
50 |
)
|
51 |
|
52 |
def _split_generators(self, dl_manager):
|
|
|
101 |
yield id_, {
|
102 |
'image_file_path': image_file_path,
|
103 |
'image': image,
|
104 |
+
'labels': row[1],
|
105 |
}
|