Downloads · 30 days
13
0% of all-time downloads
lawcompany/KLAID_LJP_base
KLAID_LJP_base is a text classification model from lawcompany. Use it when you need a label for a piece of text. It is set up for transformers. The card lists the license as cc-by-nc-nd-4.0.
KLAID(Korean Legal Artificial Intelligence Datasets) LJP classification model based on pretrained KLUE RoBERTa-base. See more information about KLUE: Github and Paper for more details. NOTE: Use BertTokenizer instead…
Downloads · 30 days
13
0% of all-time downloads
All-time downloads
3.9K
Public
Repo size
2.2 GB
Likes
3
Public
Click a slice to open those files.
.h5443 MB · 50%
From the Hugging Face model README
KLAID(Korean Legal Artificial Intelligence Datasets) LJP classification model based on pretrained KLUE RoBERTa-base. See more information about KLUE: Github and Paper for more details.
NOTE: Use BertTokenizer instead of RobertaTokenizer and RobertaForSequenceClassification. (AutoTokenizer will load BertTokenizer)
import numpy as np
from transformers import AutoTokenizer, AutoModelForSequenceClassification
tokenizer = AutoTokenizer.from_pretrained("lawcompany/KLAID_LJP_base")
model = AutoModelForSequenceClassification.from_pretrained("lawcompany/KLAID_LJP_base")
model.eval()
input_data = tokenizer("피고인은 2022. 11. 14. 혈중알콜농도 0.123%의 술에 취한 상태로 승용차를 운전하였다.",
max_length=512,
return_tensors="pt")
logits = model(**input_data).logits.detach().numpy()
pred = np.argmax(logits)
# output
# 7
Copyright 2022-present Law&Company Co. Ltd.
Licensed under the CC-BY-NC-ND-4.0