YAML Metadata Warning:empty or missing yaml metadata in repo card

Check out the documentation for more information.

DistilBERT Sentiment Analysis Model

Overview

This model is a fine-tuned DistilBERT model for customer review sentiment analysis.

The model classifies customer reviews into three sentiment categories:

  • Positive
  • Neutral
  • Negative

Model Details

  • Base Model: distilbert-base-uncased
  • Task: Text Classification
  • Number of Classes: 3
  • Labels:
    • 0: Negative
    • 1: Neutral
    • 2: Positive

Training Data

The model was fine-tuned on a dataset of customer reviews annotated with sentiment labels.

Intended Use

This model can be used to:

  • Analyze customer feedback
  • Monitor consumer sentiment
  • Classify reviews automatically
  • Support business intelligence applications

Example Usage

from transformers import AutoTokenizer, AutoModelForSequenceClassification
import torch

model_name = "mdjrjoy/distilbert-my-task"

tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForSequenceClassification.from_pretrained(model_name)

text = "The product quality is excellent."

inputs = tokenizer(text, return_tensors="pt", truncation=True)

with torch.no_grad():
    outputs = model(**inputs)

prediction = torch.argm**(outputs.logits, dim=1).item()

l**els = {
    0: "Negative",
    1:**Neutral",
    2: "Positive"
}

pr**t(labels[prediction])

Lim**ations

  • Performance dependsn the quality andiversity of the training data.
  • e model may perform lessccurately on reviews from domainshat differ significantly from theraining data.
  • Sentiment cane subjective and contextependent.

License

Specify thlicensender which theodel is distributed. ````

Downloads last month
2
Safetensors
Model size
67M params
Tensor type
F32
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support