Halfotter/flud
08
1# Steel Material Classification Model
2
3## Quick Start
4
5```python
6from transformers import AutoTokenizer, AutoModelForSequenceClassification
7import torch
8
9# Load model
10model_name = "your-username/steel-material-classifier"
11tokenizer = AutoTokenizer.from_pretrained(model_name)
12model = AutoModelForSequenceClassification.from_pretrained(model_name)
13
14# Predict
15text = "철광석을 고로에서 환원하여 선철을 제조하는 과정"
16inputs = tokenizer(text, return_tensors="pt", truncation=True, max_length=512)
17
18with torch.no_grad():
19 outputs = model(**inputs)
20 predictions = torch.nn.functional.softmax(outputs.logits, dim=-1)
21 predicted_class = torch.argmax(predictions, dim=1).item()
22
23label = model.config.id2label[predicted_class]
24confidence = predictions[0][predicted_class].item()
25print(f"Predicted: {label} (Confidence: {confidence:.4f})")
26```
27
28## Model Information
29
30- **Base Model**: XLM-RoBERTa
31- **Task**: Sequence Classification
32- **Labels**: 66 steel industry materials
33- **Languages**: Korean, English
34- **Model Size**: ~1GB
35
36## Supported Labels
37
38The model can classify 66 different steel industry materials including:
39
40- **Raw Materials**: 철광석, 석회석, 석유 코크스, 무연탄, 갈탄
41- **Fuels**: 천연가스, 액화천연가스, 경유, 휘발유, 등유
42- **Gases**: 일산화탄소, 메탄, 에탄, 고로가스, 코크스 오븐 가스
43- **Products**: 강철, 선철, 철, 열간성형철 (HBI), 고온 성형 환원철
44- **By-products**: 고로 슬래그, 압연 스케일, 분진, 슬러지, 절삭칩
45- **Others**: 전기, 냉각수, 윤활유, 포장재, 열유입
46
47## Performance
48
49- **Label Independence**: Good (average similarity: 0.1166)
50- **Orthogonality**: Good (average dot product: 0.2043)
51- **Overall Assessment**: The model shows good separation between different material categories
52
53## Usage Examples
54
55### Single Prediction
56```python
57text = "천연가스를 연료로 사용하여 고로를 가열"
58# Returns: "천연가스" with confidence score
59```
60
61### Batch Prediction
62```python
63texts = [
64 "철광석을 고로에서 환원하여 선철을 제조하는 과정",
65 "석회석을 첨가하여 슬래그를 형성"
66]
67# Returns: ["철광석", "석회석"] with confidence scores
68```
69
70## Installation
71
72```bash
73pip install torch transformers
74```
75
76## License
77
78[Add your license information]
79
80## Citation
81
82If you use this model in your research, please cite:
83
84```bibtex
85[Add citation information here]
86```
87 