Initial Commit
Browse files- split-test.py +4 -2
split-test.py
CHANGED
|
@@ -126,13 +126,15 @@ class SplitTest(datasets.GeneratorBasedBuilder):
|
|
| 126 |
# It can accept any type or nested list/dict and will give back the same structure with the url replaced with path to local files.
|
| 127 |
# By default the archives will be extracted and a path to a cached folder where they are extracted is returned instead of the archive
|
| 128 |
|
| 129 |
-
|
|
|
|
|
|
|
| 130 |
return [
|
| 131 |
datasets.SplitGenerator(
|
| 132 |
name=datasets.Split.TRAIN,
|
| 133 |
# These kwargs will be passed to _generate_examples
|
| 134 |
gen_kwargs={
|
| 135 |
-
"filepath":
|
| 136 |
"split": "train",
|
| 137 |
},
|
| 138 |
)
|
|
|
|
| 126 |
# It can accept any type or nested list/dict and will give back the same structure with the url replaced with path to local files.
|
| 127 |
# By default the archives will be extracted and a path to a cached folder where they are extracted is returned instead of the archive
|
| 128 |
|
| 129 |
+
data_dir = "https://huggingface.co/datasets/shivam/split-test/blob/main/text." + _LANGS[self.config.name]
|
| 130 |
+
archive_path = dl_manager.download(data_dir)
|
| 131 |
+
|
| 132 |
return [
|
| 133 |
datasets.SplitGenerator(
|
| 134 |
name=datasets.Split.TRAIN,
|
| 135 |
# These kwargs will be passed to _generate_examples
|
| 136 |
gen_kwargs={
|
| 137 |
+
"filepath": archive_path,
|
| 138 |
"split": "train",
|
| 139 |
},
|
| 140 |
)
|