Edit model card

Model Card for DistilRoBERTaEmotionClassifier

This model was created to demonstrate several MLOps practices and was for education purposes only. Please see the following GitHub repo covering the material

Model Details

Model Description

This model was trained on the Kaggle Emotions dataset, which has 6 classes.

  • Sadness (0)
  • Joy (1)
  • Love (2)
  • Anger (3)
  • Fear (4)
  • Surprise (5)

Model Usage

import torch
from transformers import AutoModelForSequenceClassification, AutoTokenizer

# Load the model and tokenizer
model = AutoModelForSequenceClassification.from_pretrained("teglad/DistilRoBERTaEmotionClassifier")
tokenizer = AutoTokenizer.from_pretrained("teglad/DistilRoBERTaEmotionClassifier")

# Tokenize the input text, returning PyTorch tensors.
input_ids = tokenizer("Deep Learning models can be so difficult to understand, how do they even work?", return_tensors="pt")

# Pass the input_ids and attention_masks into the model
output = model(**input_ids)

# Get the position of the largest logit, this is the predicted class
prediction = torch.argmax(output.logits, dim=1).tolist()
Downloads last month
4
Safetensors
Model size
82.1M params
Tensor type
F32
·