Create README.md
Browse files
README.md
ADDED
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
Pretrained K-mHas with multi-label model with "koelectra-v3"
|
2 |
+
|
3 |
+
You can use tokenizer of this model with "monologg/koelectra-v3-base-discriminator" (https://huggingface.co/monologg/koelectra-base-v3-discriminator)
|
4 |
+
|
5 |
+
label maps are like this.
|
6 |
+
>>>
|
7 |
+
{'origin': 0,
|
8 |
+
'physical': 1,
|
9 |
+
'politics': 2,
|
10 |
+
'profanity': 3,
|
11 |
+
'age': 4,
|
12 |
+
'gender': 5,
|
13 |
+
'race': 6,
|
14 |
+
'religion': 7,
|
15 |
+
'not_hate_speech': 8}
|
16 |
+
|
17 |
+
You can use label map with below code.
|
18 |
+
>
|
19 |
+
|
20 |
+
from huggingface_hub import hf_hub_download
|
21 |
+
|
22 |
+
repo_id = "JunHwi/kmhas_multilabel"
|
23 |
+
|
24 |
+
filename = "kmhas_dict.pickle" # ์ repo_id์ ์
๋ก๋ํ ํ์ผ ์ด๋ฆ
|
25 |
+
|
26 |
+
label_dict = hf_hub_download(repo_id, filename)
|
27 |
+
|
28 |
+
with open(label_dict, "rb") as f:
|
29 |
+
label2num = pickle.load(f)
|