Spaces:
Sleeping
Sleeping
Create check_labels.py
Browse files- backend/check_labels.py +9 -0
backend/check_labels.py
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
|
| 2 |
+
from transformers import AutoConfig
|
| 3 |
+
import json
|
| 4 |
+
|
| 5 |
+
MODEL_NAME = "ProsusAI/finbert"
|
| 6 |
+
config = AutoConfig.from_pretrained(MODEL_NAME)
|
| 7 |
+
|
| 8 |
+
with open("finbert_labels.json", "w") as f:
|
| 9 |
+
json.dump(config.id2label, f)
|