SDE Downstreams
Collection
Various downstream models for NASA's Science Discovery Engine (SDE)
โข
4 items
โข
Updated
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"
You can load this model using the Hugging Face ๐ค Transformers library:
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)
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)
Base model
nasa-impact/nasa-smd-ibm-v0.1