# Using load\_datasets for newly created datasets

**URL:** <https://discuss.huggingface.co/t/using-load-datasets-for-newly-created-datasets/9506>\
**Category:** 🤗Datasets\
**Created:** [August 26, 2021, 8:19pm UTC](https://discuss.huggingface.co/t/using-load-datasets-for-newly-created-datasets/9506 "2021-08-26T20:19:27Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sam2021](https://avatars.discourse-cdn.com/v4/letter/s/a8b319/32.png) [@Sam2021](https://discuss.huggingface.co/u/Sam2021)\
**Post date:** [August 26, 2021, 8:19pm UTC](https://discuss.huggingface.co/t/using-load-datasets-for-newly-created-datasets/9506/1 "2021-08-26T20:19:27Z")

</div>

Hi all

I am created a new public datasets here ([Sam2021/Arguement\_Mining\_CL2017 · Datasets at Hugging Face](https://huggingface.co/datasets/Sam2021/Arguement_Mining_CL2017)) and I have added loading script with link to actual data in github.

But I am not able to load the data remotely using  
data = load\_datasets('Sam2021/Arguement\_Mining\_CL2017)

Can anyone please let me know what I am doing wrong ?

---

<div class="post-metadata">

**Author:** ![lhoestq](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/lhoestq/32/52888_2.png) [@lhoestq](https://discuss.huggingface.co/u/lhoestq)\
**Post date:** [August 27, 2021, 10:10am UTC](https://discuss.huggingface.co/t/using-load-datasets-for-newly-created-datasets/9506/2 "2021-08-27T10:10:42Z")

</div>

Hi ! If your data is in the dataset repository, then you can just pass the name of the data files to be downloaded:

```python
_TRAINING_FILE = "train.txt"
_TEST_FILE = "test.txt"

```

```python
    def _split_generators(self, dl_manager):
        """Returns SplitGenerators."""
        urls_to_download = {"train": _TRAINING_FILE, "test": _TEST_FILE}
        downloaded_files = dl_manager.download_and_extract(urls_to_download)
        return [
            datasets.SplitGenerator(name=datasets.Split.TRAIN, gen_kwargs={"filepath": downloaded_files["train"]}),
            datasets.SplitGenerator(name=datasets.Split.TEST, gen_kwargs={"filepath": downloaded_files["test"]}),
        ]

```

Under the hood it will download it from an URL like this one:  
[https://huggingface.co/datasets/Sam2021/Arguement\_Mining\_CL2017/resolve/main/train.txt](https://huggingface.co/datasets/Sam2021/Arguement_Mining_CL2017/resolve/main/train.txt)

---

<div class="post-metadata">

**Author:** ![Sam2021](https://avatars.discourse-cdn.com/v4/letter/s/a8b319/32.png) [@Sam2021](https://discuss.huggingface.co/u/Sam2021)\
**Post date:** [August 27, 2021, 10:41am UTC](https://discuss.huggingface.co/t/using-load-datasets-for-newly-created-datasets/9506/3 "2021-08-27T10:41:15Z")

</div>

Thanks ! I have resolved it now, it was a stupid mistake on my part
