Download example_usage.py from main-horse/ffv4_dataset_test: direct link, hf CLI and curl.
- Browser
- Download file 369 Bytes
-
https://huggingface.co/datasets/main-horse/ffv4_dataset_test/resolve/main/example_usage.py
- Command line
-
hf download hf://datasets/main-horse/ffv4_dataset_test/example_usage.py
-
curl -L -o example_usage.py https://huggingface.co/datasets/main-horse/ffv4_dataset_test/resolve/main/example_usage.py
369 Bytes
| import datasets | |
| ds = datasets.load_dataset('./dataset_code.py', 'notebook_defaults') | |
| ds_real = ds['everything'] # there is no such thing as a train/test split here | |
| one_item = ds_real[0] # grab first story, and truncuate the text of it to first 1000 characters | |
| one_item_truncuated = one_item | {'story': one_item['story'][:1000]} | |
| print(ds) | |
| print(one_item_truncuated) | |