Division Classification Model
This is a single label classification task for automated tagging of documents in Science Discovery Engine. Based on INDUS Model
The idx to label mapping is:
"0": "Astrophysics",
"1": "Biological and Physical Sciences",
"2": "Earth Science",
"3": "Heliophysics",
"4": "Planetary Science"
Data distribution
Evalution of the model:
How to Use
You can load this model using the Hugging Face 🤗 Transformers library:
Using the Pipeline
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
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)
- Downloads last month
- 24
This model does not have enough activity to be deployed to Inference API (serverless) yet. Increase its social
visibility and check back later, or deploy to Inference Endpoints (dedicated)
instead.
Model tree for nasa-impact/division-classifier
Base model
nasa-impact/nasa-smd-ibm-v0.1