KLAID_LJP_base / README.md
sunghwan's picture
Update README.md
5704814
---
license: cc-by-nc-nd-4.0
language: ko
widget:
- text: 피고인은 2022. 11. 14. 혈중알콜농도 0.123%의 술에 취한 상태로 승용차를 운전하였다.
---
# Model information
KLAID(Korean Legal Artificial Intelligence Datasets) LJP classification model based on pretrained KLUE RoBERTa-base. See more information about KLUE: [Github](https://github.com/KLUE-benchmark/KLUE) and [Paper](https://arxiv.org/abs/2105.09680) for more details.
## How to use
_NOTE:_ Use `BertTokenizer` instead of RobertaTokenizer and RobertaForSequenceClassification. (`AutoTokenizer` will load `BertTokenizer`)
```python
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
```
## Licensing information
Copyright 2022-present [Law&Company Co. Ltd.](https://career.lawcompany.co.kr/)
Licensed under the CC-BY-NC-ND-4.0
## Other Inquiries
- **Email:** [klaid@lawcompany.co.kr](klaid@lawcompany.co.kr)
- **Homepage:** [https://klaid.net/](https://klaid.net/)