Update soybean_dataset.py
Browse files- soybean_dataset.py +6 -6
soybean_dataset.py
CHANGED
|
@@ -67,9 +67,9 @@ _LICENSE = "Under a Creative Commons license"
|
|
| 67 |
# This can be an arbitrary nested dict/list of URLs (see below in `_split_generators` method)
|
| 68 |
|
| 69 |
_URLs = {
|
| 70 |
-
"train" : "https://huggingface.co/datasets/lisawen/soybean_dataset/resolve/main/train.zip
|
| 71 |
-
"test": "https://huggingface.co/datasets/lisawen/soybean_dataset/resolve/main/test.zip
|
| 72 |
-
"valid": "https://huggingface.co/datasets/lisawen/soybean_dataset/resolve/main/valid.zip
|
| 73 |
}
|
| 74 |
|
| 75 |
# TODO: Name of the dataset usually matches the script name with CamelCase instead of snake_case
|
|
@@ -109,11 +109,11 @@ class SoybeanDataset(datasets.GeneratorBasedBuilder):
|
|
| 109 |
# Since we're using a local file, we don't need to download it, so we just return the path.
|
| 110 |
return [
|
| 111 |
datasets.SplitGenerator(
|
| 112 |
-
name=datasets.Split.TRAIN, gen_kwargs={"filepath": downloaded_files["train"]}),
|
| 113 |
datasets.SplitGenerator(
|
| 114 |
-
name=datasets.Split.TEST, gen_kwargs={"filepath": downloaded_files["test"]}),
|
| 115 |
datasets.SplitGenerator(
|
| 116 |
-
name=datasets.Split.VALIDATION, gen_kwargs={"filepath": downloaded_files["valid"]}),
|
| 117 |
]
|
| 118 |
|
| 119 |
|
|
|
|
| 67 |
# This can be an arbitrary nested dict/list of URLs (see below in `_split_generators` method)
|
| 68 |
|
| 69 |
_URLs = {
|
| 70 |
+
"train" : "https://huggingface.co/datasets/lisawen/soybean_dataset/resolve/main/train.zip",
|
| 71 |
+
"test": "https://huggingface.co/datasets/lisawen/soybean_dataset/resolve/main/test.zip",
|
| 72 |
+
"valid": "https://huggingface.co/datasets/lisawen/soybean_dataset/resolve/main/valid.zip"
|
| 73 |
}
|
| 74 |
|
| 75 |
# TODO: Name of the dataset usually matches the script name with CamelCase instead of snake_case
|
|
|
|
| 109 |
# Since we're using a local file, we don't need to download it, so we just return the path.
|
| 110 |
return [
|
| 111 |
datasets.SplitGenerator(
|
| 112 |
+
name=datasets.Split.TRAIN, gen_kwargs={"filepath": os.path.join(downloaded_files["train"], "train")}),
|
| 113 |
datasets.SplitGenerator(
|
| 114 |
+
name=datasets.Split.TEST, gen_kwargs={"filepath": os.path.join(downloaded_files["test"], "test")}),
|
| 115 |
datasets.SplitGenerator(
|
| 116 |
+
name=datasets.Split.VALIDATION, gen_kwargs={"filepath": os.path.join(downloaded_files["valid"], "valid")}),
|
| 117 |
]
|
| 118 |
|
| 119 |
|