Update hugging_face.py
Browse files- hugging_face.py +4 -8
hugging_face.py
CHANGED
|
@@ -84,31 +84,27 @@ class RDD2020_Dataset(datasets.GeneratorBasedBuilder):
|
|
| 84 |
for name, url in urls_to_download.items()
|
| 85 |
}
|
| 86 |
|
| 87 |
-
|
| 88 |
-
os.rename(downloaded_files["train"], "train")
|
| 89 |
-
os.rename(downloaded_files["test"], "test")
|
| 90 |
-
os.rename(downloaded_files["validation"], "validation")
|
| 91 |
-
|
| 92 |
|
| 93 |
return [
|
| 94 |
datasets.SplitGenerator(
|
| 95 |
name=datasets.Split.TRAIN,
|
| 96 |
gen_kwargs={
|
| 97 |
-
"filepath":
|
| 98 |
"split": "train",
|
| 99 |
}
|
| 100 |
),
|
| 101 |
datasets.SplitGenerator(
|
| 102 |
name=datasets.Split.TEST,
|
| 103 |
gen_kwargs={
|
| 104 |
-
"filepath": downloaded_files["test"],
|
| 105 |
"split": "test",
|
| 106 |
}
|
| 107 |
),
|
| 108 |
datasets.SplitGenerator(
|
| 109 |
name=datasets.Split.VALIDATION,
|
| 110 |
gen_kwargs={
|
| 111 |
-
"filepath":
|
| 112 |
"split": "validation",
|
| 113 |
}
|
| 114 |
),
|
|
|
|
| 84 |
for name, url in urls_to_download.items()
|
| 85 |
}
|
| 86 |
|
| 87 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
| 88 |
|
| 89 |
return [
|
| 90 |
datasets.SplitGenerator(
|
| 91 |
name=datasets.Split.TRAIN,
|
| 92 |
gen_kwargs={
|
| 93 |
+
"filepath":os.path.join(downloaded_files["train"], "train"),
|
| 94 |
"split": "train",
|
| 95 |
}
|
| 96 |
),
|
| 97 |
datasets.SplitGenerator(
|
| 98 |
name=datasets.Split.TEST,
|
| 99 |
gen_kwargs={
|
| 100 |
+
"filepath": os.path.join(downloaded_files["test"], "test"),
|
| 101 |
"split": "test",
|
| 102 |
}
|
| 103 |
),
|
| 104 |
datasets.SplitGenerator(
|
| 105 |
name=datasets.Split.VALIDATION,
|
| 106 |
gen_kwargs={
|
| 107 |
+
"filepath":os.path.join(downloaded_files["validation"], "validation"),
|
| 108 |
"split": "validation",
|
| 109 |
}
|
| 110 |
),
|