mrjunos commited on
Commit
bf253b3
·
1 Parent(s): fb6622f

Update depression-reddit-cleaned.py

Browse files
Files changed (1) hide show
  1. depression-reddit-cleaned.py +5 -3
depression-reddit-cleaned.py CHANGED
@@ -11,6 +11,7 @@ import json
11
  import os
12
 
13
  import datasets
 
14
 
15
  _DESCRIPTION = """\
16
  The dataset provided is a Depression: Reddit Dataset (Cleaned)containing approximately
@@ -46,12 +47,13 @@ class DepressionRedditCleaned(datasets.GeneratorBasedBuilder):
46
  features=datasets.Features(
47
  {
48
  "clean_text": datasets.Value("string"),
49
- "is_depression": datasets.Value("int64"),
50
- "label": datasets.features.ClassLabel(
51
  names=["not_depression", "depression"]
52
  )
53
  }
54
- )
 
55
  )
56
 
57
  def _split_generators(self, dl_manager):
 
11
  import os
12
 
13
  import datasets
14
+ from datasets.tasks import TextClassification
15
 
16
  _DESCRIPTION = """\
17
  The dataset provided is a Depression: Reddit Dataset (Cleaned)containing approximately
 
47
  features=datasets.Features(
48
  {
49
  "clean_text": datasets.Value("string"),
50
+ "is_depression": datasets.features.ClassLabel(
51
+ num_classes=2,
52
  names=["not_depression", "depression"]
53
  )
54
  }
55
+ ),
56
+ task_templates=[TextClassification(text_column="clean_text", label_column="is_depression")]
57
  )
58
 
59
  def _split_generators(self, dl_manager):