File size: 697 Bytes
5fa1a76
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
When prompted, enter your token to login:

from huggingface_hub import notebook_login
notebook_login()

Load BillSum dataset
Start by loading the smaller California state bill subset of the BillSum dataset from the 🤗 Datasets library:

from datasets import load_dataset
billsum = load_dataset("billsum", split="ca_test")

Split the dataset into a train and test set with the [~datasets.Dataset.train_test_split] method:

billsum = billsum.train_test_split(test_size=0.2)

Then take a look at an example:

billsum["train"][0]
{'summary': 'Existing law authorizes state agencies to enter into contracts for the acquisition of goods or services upon approval by the Department of General Services.