Update labels.py
Browse files
labels.py
CHANGED
|
@@ -85,7 +85,7 @@ class AGNews(datasets.GeneratorBasedBuilder):
|
|
| 85 |
# Original labels are [1, 2, 3, 4] ->
|
| 86 |
# ['World', 'Sports', 'Business', 'Sci/Tech']
|
| 87 |
# Re-map to [0, 1, 2, 3].
|
| 88 |
-
label = int(label)
|
| 89 |
text = " ".join((title, description))
|
| 90 |
yield id_, {"text": text, "label": label}
|
| 91 |
|
|
|
|
| 85 |
# Original labels are [1, 2, 3, 4] ->
|
| 86 |
# ['World', 'Sports', 'Business', 'Sci/Tech']
|
| 87 |
# Re-map to [0, 1, 2, 3].
|
| 88 |
+
label = int(label)
|
| 89 |
text = " ".join((title, description))
|
| 90 |
yield id_, {"text": text, "label": label}
|
| 91 |
|