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

Check out the documentation for more information.

library_name: transformers tags: sentiment-analysis, classification, NLP, transformers, HuggingFace

Model Card for Sentiment Analysis Model

This model is a fine-tuned transformer-based model for sentiment analysis, capable of classifying text into one of five categories: Strong Negative, Mild Negative, Neutral, Mild Positive, and Strong Positive.

Model Details

Model Description

This is a sentiment analysis model based on the DistilBERT architecture, fine-tuned on a synthetic dataset to classify customer feedback into five sentiment categories. The model was fine-tuned to understand nuanced sentiments, making it useful for applications like customer service, social media monitoring, and product feedback analysis.

  • Developed by: Bharath Varma Kantheti
  • Funded by: Self-funded
  • Shared by: Bharath Varma Kantheti
  • Model type: Transformer-based sequence classification
  • Language(s) (NLP): English
  • License: Apache-2.0
  • Finetuned from model: DistilBERT-base-uncased

Model Sources

Uses

Direct Use

The model can be directly used for classifying text into sentiment categories. It is useful in scenarios where understanding customer sentiment is crucial, such as in customer service automation, product review analysis, and social media sentiment tracking.

Downstream Use [optional]

The model can be further fine-tuned on specific sentiment datasets for more targeted applications, such as sentiment analysis in specific industries like finance or healthcare.

Out-of-Scope Use

  • The model may not perform well on non-English text.
  • It is not suitable for tasks that require understanding of context beyond simple sentiment classification, such as irony detection or complex multi-sentence reasoning.
  • Misuse in generating biased or harmful content is not recommended.

Bias, Risks, and Limitations

  • Bias: The model might inherit biases present in the synthetic data or pre-trained model, leading to skewed or unfair sentiment classifications.
  • Limitations: The model’s performance may degrade on text that is significantly different from the training data, such as domain-specific jargon or highly technical language.
  • Overfitting: The model might be overfitted to the specific style of the synthetic training data, leading to poorer generalization to real-world data.

Recommendations

Users should test the model on their specific data to ensure it performs as expected. It's recommended to use the model in conjunction with other models or human oversight to mitigate biases and ensure fairness.

How to Get Started with the Model

Use the code below to get started with the model.

from transformers import AutoTokenizer, AutoModelForSequenceClassification

model_name = "BharathVarmaKantheti/sentiment_analysis_model"

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

text = "I love this product! It has exceeded my expectations in every way."
inputs = tokenizer(text, return_tensors="pt")
outputs = model(**inputs)

predicted_class = outputs.logits.argmax(-1).item()
id2label = {0: 'Strong Negative', 1: 'Mild Negative', 2: 'Neutral', 3: 'Mild Positive', 4: 'Strong Positive'}
predicted_sentiment = id2label[predicted_class]

print(f"Predicted Sentiment: {predicted_sentiment}")
Downloads last month
18
Safetensors
Model size
0.1B params
Tensor type
F32
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support