ffv4_dataset_test / example_usage.py
main-horse's picture
add code for using the ds
e4bfb2b
raw
history blame contribute delete
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)