Berbex commited on
Commit
6fd5709
Β·
1 Parent(s): 9429d1c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -13,7 +13,6 @@ tokenizer = AutoTokenizer.from_pretrained("bert-base-uncased")
13
 
14
  labels = [label for label in dataset['train'].features.keys() if label not in ['text']]
15
 
16
- console.log( labels )
17
  def preprocess_data(examples):
18
  # take a batch of texts
19
  text = examples["text"]
@@ -31,9 +30,10 @@ def preprocess_data(examples):
31
 
32
  return encoding
33
 
 
34
 
35
-
36
-
37
 
38
 
39
 
 
13
 
14
  labels = [label for label in dataset['train'].features.keys() if label not in ['text']]
15
 
 
16
  def preprocess_data(examples):
17
  # take a batch of texts
18
  text = examples["text"]
 
30
 
31
  return encoding
32
 
33
+ encoded_dataset = dataset.map(preprocess_data, batched=True, remove_columns=dataset['train'].column_names)
34
 
35
+ example = encoded_dataset['train'][0]
36
+ console.log(example.keys())
37
 
38
 
39