File size: 1,791 Bytes
0443d57 54173dd 821fc6d 0443d57 01b6297 0443d57 9c77776 01b6297 0443d57 01b6297 8c64f1a 01b6297 54173dd |
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 |
---
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

## Evalution of the model:


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