--- base_model: - nasa-impact/nasa-smd-ibm-v0.1 tags: - single-label pipeline_tag: text-classification library_name: transformers --- # Division Classification Model This is a single label classification task for automated tagging of documents in Science Discovery Engine. Based on [INDUS Model](https://huggingface.co/nasa-impact/nasa-smd-ibm-v0.1) The idx to label mapping is: ``` "0": "Astrophysics", "1": "Biological and Physical Sciences", "2": "Earth Science", "3": "Heliophysics", "4": "Planetary Science" ``` ## Data distribution ![image/png](https://cdn-uploads.huggingface.co/production/uploads/675c4e0a0fd4155cb71fc2a6/yr-bXZRTtVO-6Be_PM2SY.png) ## Evalution of the model: ![image/png](https://cdn-uploads.huggingface.co/production/uploads/675c4e0a0fd4155cb71fc2a6/Vz4R0i_q0Uklwv8uZcdhS.png) ![image/png](https://cdn-uploads.huggingface.co/production/uploads/675c4e0a0fd4155cb71fc2a6/Lh7CPtHpXUtiZWd0k3eKr.png) ## How to Use You can load this model using the Hugging Face 🤗 Transformers library: ### Using the Pipeline ```python from transformers import pipeline classifier = pipeline("text-classification", model="nasa-impact/division-classifier") prediction = classifier("Your input text", truncation=True, padding="max_length", max_length=512) print(prediction) ``` ### Using the Model ```python from transformers import AutoTokenizer, AutoModelForSequenceClassification model_name = "nasa-impact/division-classifier" tokenizer = AutoTokenizer.from_pretrained(model_name) model = AutoModelForSequenceClassification.from_pretrained(model_name) inputs = tokenizer("Your input text", return_tensors="pt", truncation=True, max_length=512, padding="max_length") outputs = model(**inputs) predicted_label = outputs.logits.argmax(-1).item() print(predicted_label) ```