PROSTLE commited on
Commit
934e60d
·
unverified ·
1 Parent(s): 88f62ef

Create check_labels.py

Browse files
Files changed (1) hide show
  1. 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)