Upload OpenSLU_Clone.py with huggingface_hub
Browse files- OpenSLU_Clone.py +2 -5
OpenSLU_Clone.py
CHANGED
@@ -60,7 +60,7 @@ class OpenSLU(datasets.GeneratorBasedBuilder):
|
|
60 |
name="products",
|
61 |
description=_ATIS_DESCRIPTION,
|
62 |
features=["text"],
|
63 |
-
data_url="https://huggingface.co/datasets/rams901/OpenSLU_Clone/resolve/main/
|
64 |
citation=_ATIS_CITATION,
|
65 |
url="https://aclanthology.org/H90-1021",
|
66 |
),
|
@@ -85,10 +85,7 @@ class OpenSLU(datasets.GeneratorBasedBuilder):
|
|
85 |
task_name = _get_task_name_from_data_url(self.config.data_url)
|
86 |
print(dl_dir)
|
87 |
print(task_name)
|
88 |
-
print(os.listdir(dl_dir))
|
89 |
dl_dir = os.path.join(dl_dir, task_name)
|
90 |
-
print(os.listdir(dl_dir))
|
91 |
-
|
92 |
return [
|
93 |
datasets.SplitGenerator(
|
94 |
name=datasets.Split.TRAIN,
|
@@ -156,4 +153,4 @@ def _get_record_answers(qa):
|
|
156 |
|
157 |
|
158 |
def _get_task_name_from_data_url(data_url):
|
159 |
-
return data_url.split("/")[-1].split("
|
|
|
60 |
name="products",
|
61 |
description=_ATIS_DESCRIPTION,
|
62 |
features=["text"],
|
63 |
+
data_url="https://huggingface.co/datasets/rams901/OpenSLU_Clone/resolve/main/prods.tar.gz",
|
64 |
citation=_ATIS_CITATION,
|
65 |
url="https://aclanthology.org/H90-1021",
|
66 |
),
|
|
|
85 |
task_name = _get_task_name_from_data_url(self.config.data_url)
|
86 |
print(dl_dir)
|
87 |
print(task_name)
|
|
|
88 |
dl_dir = os.path.join(dl_dir, task_name)
|
|
|
|
|
89 |
return [
|
90 |
datasets.SplitGenerator(
|
91 |
name=datasets.Split.TRAIN,
|
|
|
153 |
|
154 |
|
155 |
def _get_task_name_from_data_url(data_url):
|
156 |
+
return data_url.split("/")[-1].split(".")[0]
|