Update LongConL.py
Browse files- LongConL.py +8 -8
LongConL.py
CHANGED
|
@@ -72,15 +72,14 @@ class LongConLDataset(datasets.GeneratorBasedBuilder):
|
|
| 72 |
)
|
| 73 |
|
| 74 |
def _split_generators(self, dl_manager):
|
| 75 |
-
|
| 76 |
-
|
| 77 |
-
|
| 78 |
-
|
| 79 |
-
|
| 80 |
-
|
| 81 |
-
print("Resolved URLs:", urls)
|
| 82 |
downloaded_files = dl_manager.download_and_extract(urls)
|
| 83 |
-
|
| 84 |
return [
|
| 85 |
datasets.SplitGenerator(
|
| 86 |
name=datasets.Split.TRAIN,
|
|
@@ -96,6 +95,7 @@ class LongConLDataset(datasets.GeneratorBasedBuilder):
|
|
| 96 |
),
|
| 97 |
]
|
| 98 |
|
|
|
|
| 99 |
def _generate_examples(self, file_path):
|
| 100 |
"""Generate examples from the dataset CSV."""
|
| 101 |
data = pd.read_csv(file_path)
|
|
|
|
| 72 |
)
|
| 73 |
|
| 74 |
def _split_generators(self, dl_manager):
|
| 75 |
+
task_name = self.config.name
|
| 76 |
+
# Replace hyphens with underscores if your URLs use underscores
|
| 77 |
+
|
| 78 |
+
urls = {
|
| 79 |
+
key: val.format(task_name) for key, val in _URLS.items()
|
| 80 |
+
}
|
|
|
|
| 81 |
downloaded_files = dl_manager.download_and_extract(urls)
|
| 82 |
+
|
| 83 |
return [
|
| 84 |
datasets.SplitGenerator(
|
| 85 |
name=datasets.Split.TRAIN,
|
|
|
|
| 95 |
),
|
| 96 |
]
|
| 97 |
|
| 98 |
+
|
| 99 |
def _generate_examples(self, file_path):
|
| 100 |
"""Generate examples from the dataset CSV."""
|
| 101 |
data = pd.read_csv(file_path)
|