Update beans.py
Browse files
beans.py
CHANGED
@@ -18,6 +18,8 @@
|
|
18 |
from pathlib import Path
|
19 |
|
20 |
import datasets
|
|
|
|
|
21 |
|
22 |
_CITATION = """\
|
23 |
@ONLINE {beansdata,
|
@@ -59,7 +61,8 @@ class Beans(datasets.GeneratorBasedBuilder):
|
|
59 |
}),
|
60 |
supervised_keys=("file", "labels"),
|
61 |
homepage="https://github.com/AI-Lab-Makerere/ibean/",
|
62 |
-
citation=_CITATION
|
|
|
63 |
)
|
64 |
|
65 |
def _split_generators(self, dl_manager):
|
18 |
from pathlib import Path
|
19 |
|
20 |
import datasets
|
21 |
+
from datasets.tasks import ImageClassification
|
22 |
+
|
23 |
|
24 |
_CITATION = """\
|
25 |
@ONLINE {beansdata,
|
61 |
}),
|
62 |
supervised_keys=("file", "labels"),
|
63 |
homepage="https://github.com/AI-Lab-Makerere/ibean/",
|
64 |
+
citation=_CITATION,
|
65 |
+
task_templates=[ImageClassification(image_file_path_column="file", label_column="labels", labels=sorted(tuple(_NAMES)))]
|
66 |
)
|
67 |
|
68 |
def _split_generators(self, dl_manager):
|