| # 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] | |
| ``` | |