JunHwi/kmhas_multilabel
Pretrained K-mHas with multi-label model with "koelectra-v3"
You can use tokenizer of this model with "monologg/koelectra-v3-base-discriminator"
dataset : https://huggingface.co/datasets/jeanlee/kmhaskoreanhate_speech
pretrained_model : https://huggingface.co/monologg/koelectra-base-v3-discriminator
label maps are like this.
>>
{'origin': 0, 'physical': 1, 'politics': 2, 'profanity': 3, 'age': 4, 'gender': 5, 'race': 6, 'religion': 7, 'nothatespeech': 8}
You can use label map with below code.
from huggingfacehub import hfhub_download
repoid = "JunHwi/kmhasmultilabel"
filename = "kmhasdict.pickle" # 위 repoid에 업로드한 파일 이름
labeldict = hfhubdownload(repoid, filename)
with open(label_dict, "rb") as f: label2num = pickle.load(f)
