File size: 2,555 Bytes
14ebc37 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 | # Steel Material Classification Model
## Quick Start
```python
from transformers import AutoTokenizer, AutoModelForSequenceClassification
import torch
# Load model
model_name = "your-username/steel-material-classifier"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForSequenceClassification.from_pretrained(model_name)
# Predict
text = "μ² κ΄μμ κ³ λ‘μμ νμνμ¬ μ μ² μ μ μ‘°νλ κ³Όμ "
inputs = tokenizer(text, return_tensors="pt", truncation=True, max_length=512)
with torch.no_grad():
outputs = model(**inputs)
predictions = torch.nn.functional.softmax(outputs.logits, dim=-1)
predicted_class = torch.argmax(predictions, dim=1).item()
label = model.config.id2label[predicted_class]
confidence = predictions[0][predicted_class].item()
print(f"Predicted: {label} (Confidence: {confidence:.4f})")
```
## Model Information
- **Base Model**: XLM-RoBERTa
- **Task**: Sequence Classification
- **Labels**: 66 steel industry materials
- **Languages**: Korean, English
- **Model Size**: ~1GB
## Supported Labels
The model can classify 66 different steel industry materials including:
- **Raw Materials**: μ² κ΄μ, μνμ, μμ μ½ν¬μ€, 무μ°ν, κ°ν
- **Fuels**: μ²μ°κ°μ€, μ‘νμ²μ°κ°μ€, κ²½μ , νλ°μ , λ±μ
- **Gases**: μΌμ°ννμ, λ©ν, μν, κ³ λ‘κ°μ€, μ½ν¬μ€ μ€λΈ κ°μ€
- **Products**: κ°μ² , μ μ² , μ² , μ΄κ°μ±νμ² (HBI), κ³ μ¨ μ±ν νμμ²
- **By-products**: κ³ λ‘ μ¬λκ·Έ, μμ° μ€μΌμΌ, λΆμ§, μ¬λ¬μ§, μ μμΉ©
- **Others**: μ κΈ°, λκ°μ, μ€νμ , ν¬μ₯μ¬, μ΄μ μ
## Performance
- **Label Independence**: Good (average similarity: 0.1166)
- **Orthogonality**: Good (average dot product: 0.2043)
- **Overall Assessment**: The model shows good separation between different material categories
## Usage Examples
### Single Prediction
```python
text = "μ²μ°κ°μ€λ₯Ό μ°λ£λ‘ μ¬μ©νμ¬ κ³ λ‘λ₯Ό κ°μ΄"
# Returns: "μ²μ°κ°μ€" with confidence score
```
### Batch Prediction
```python
texts = [
"μ² κ΄μμ κ³ λ‘μμ νμνμ¬ μ μ² μ μ μ‘°νλ κ³Όμ ",
"μνμμ 첨κ°νμ¬ μ¬λκ·Έλ₯Ό νμ±"
]
# Returns: ["μ² κ΄μ", "μνμ"] with confidence scores
```
## Installation
```bash
pip install torch transformers
```
## License
[Add your license information]
## Citation
If you use this model in your research, please cite:
```bibtex
[Add citation information here]
```
|