Text Classification
Transformers
Safetensors
Korean
bert
klue
korean
urgency
minwon
complaint
text-embeddings-inference
Instructions to use atti433/minde-urgency with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use atti433/minde-urgency with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="atti433/minde-urgency")# Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("atti433/minde-urgency") model = AutoModelForSequenceClassification.from_pretrained("atti433/minde-urgency") - Notebooks
- Google Colab
- Kaggle
| language: | |
| - ko | |
| license: other | |
| library_name: transformers | |
| pipeline_tag: text-classification | |
| base_model: klue/bert-base | |
| tags: | |
| - bert | |
| - klue | |
| - korean | |
| - text-classification | |
| - urgency | |
| - minwon | |
| - complaint | |
| # MindE ๋ฏผ์ ๊ธด๊ธ ๋ถ๋ฅ๊ธฐ (urgency-bert) | |
| ํ๊ตญ ๊ณต๊ณต ๋ฏผ์์ **๊ธด๊ธ ์ฌ๋ถ(์ด์ง)**๋ฅผ ํ์ ํ๋ KLUE BERT ๊ธฐ๋ฐ ๋ชจ๋ธ. | |
| **์ฉ๋**: ๋ถ๋ฅ๊ธฐ์ ํจ๊ป ์ฌ์ฉ. `is_urgent=True`๋ฉด 119/112/์์ ์ ๋ฌธ๊ณ ์ฐ์ ์๋ด ๊ถ์ฅ. | |
| ## ์ฑ๋ฅ | |
| **Test set (86,778๊ฑด)** | |
| - Accuracy: **0.999** | |
| - AUC: **0.998** | |
| - F1 (๊ธด๊ธ ํด๋์ค): **0.929** | |
| - Precision (๊ธด๊ธ): 0.874 | |
| - Recall (๊ธด๊ธ): 0.990 | |
| ## ๋ผ๋ฒจ๋ง ๊ธฐ์ค (๋ฃฐ๋ฒ ์ด์ค ์๋ ์์ฑ) | |
| ๊ธด๊ธ ํค์๋ 30๊ฐ ๋งค์นญ + ์์ธ๋ฃฐ ์ ์ฉ: | |
| - **๊ธด๊ธ ํค์๋**: ํ์ฌ, ํญ๋ฐ์, ๊ฐ์ , ๋งค๋ชฐ, ์ถ๋ฝ, ๊ฐ์ค๋์ถ, ์ฐ์ฌํ, ์ง์ง, ๋ฐฉ์ฌ๋ฅ, ๋ ๊ทน๋ฌผ, ์๋ํ๋, ๊ฐ์ ํญ๋ ฅ, ๋ ธ์ธํ๋, ๋ถ๊ดด, ๋ฌด๋์ง/์ก, ์ฐ๋ฌ์ก/์ง, ํ ์ฌ ๋ฌด๋, ๊ฐ์ค๋์, ์ฐ๊ธฐ, ๋ฑ (30๊ฐ) | |
| - **์์ธ๋ฃฐ** (๊ธด๊ธ ํค์๋ ์์ด๋ ๋น๊ธด๊ธ ์ฒ๋ฆฌ): "์๋ฐฉ|๋๋น|์ฐ๋ ค|์๋ด|๋ฐฉ๋ฒ ์๋ ค|์ ์ฐจ|์ ๊ณ ๋ฐฉ๋ฒ|๋ฌธ์" ๋ฑ ๋๋ฐ ์ | |
| ## ํ์ต ๋ฐ์ดํฐ | |
| - AI Hub 143๋ฒ ๋ฐ์ดํฐ 86๋ง ๊ฑด ์ค ๋ฃฐ๋ฒ ์ด์ค๋ก ๋ผ๋ฒจ๋ง | |
| - ๊ธด๊ธ 6,720๊ฑด (0.78%) / ์ผ๋ฐ 858,363๊ฑด | |
| - ํ์ต: ๊ธด๊ธ ์ ์ฒด + ์ผ๋ฐ 5๋ฐฐ ์ธ๋์ํ๋ง | |
| - ํ๊ฐ: val/test ์ ์ฒด ๋ถํฌ ์ ์ง (์ค ํ๊ฒฝ ํ๊ฐ) | |
| ## ํ์ต ์ค์ | |
| - Base: `klue/bert-base` | |
| - max_length: 128, batch 32, epoch 3, lr 2e-5 | |
| - ํ์ต ์๊ฐ: ~15๋ถ (RTX 4060 Ti) | |
| ## ์ฌ์ฉ ์์ | |
| ```python | |
| from transformers import AutoTokenizer, AutoModelForSequenceClassification | |
| import torch | |
| tokenizer = AutoTokenizer.from_pretrained("atti433/minde-urgency") | |
| model = AutoModelForSequenceClassification.from_pretrained("atti433/minde-urgency") | |
| text = "์ํํธ์์ ๊ฐ์ค๋์ถ์ด ๋ฐ์ํ์ต๋๋ค ์ํํฉ๋๋ค" | |
| inputs = tokenizer(text, return_tensors="pt", truncation=True, max_length=128) | |
| with torch.no_grad(): | |
| logits = model(**inputs).logits | |
| probs = torch.softmax(logits, dim=-1) | |
| is_urgent = bool(probs[0, 1] > 0.5) | |
| print(is_urgent, probs[0, 1].item()) | |
| ``` | |
| ๋๋ ๋ณธ ํ๋ก์ ํธ์ `chatbot_service.check_urgency()` ์ฌ์ฉ (DB ํค์๋ + ์์ธ๋ฃฐ ์๋ ์ ์ฉ). | |
| ## ํ๊ณ | |
| - ๋ฃฐ๋ฒ ์ด์ค ๋ผ๋ฒจ๋ง์ด๋ผ ํค์๋ ์ค์ฌ ํ์ต โ ํค์๋ ์๋ ์ง์ง ๊ธด๊ธ ์ํฉ ๋์น ์ ์์ (์: "๋๋ก์ ์ฌ๋์ด ๋์์์ด์") | |
| - ์์ธ๋ฃฐ("์๋ฐฉ", "์๋ด") ๋๋ฐ ์ ๋น๊ธด๊ธ ์ฒ๋ฆฌ โ ๊ฐ๋ false negative | |
| - ์ค ์ด์ ์ mcp_server.py / chatbot_service.py์ ์์ธ๋ฃฐ + DB ํค์๋ ๋งค์นญ๊ณผ ํจ๊ป ์ฌ์ฉ ๊ถ์ฅ | |