Sentiment Analysis Models

This repository contains multiple trained sentiment analysis models for binary sentiment classification (Positive / Negative).

Repository Structure

Sentiment/
β”‚
β”œβ”€β”€ BERT/
β”œβ”€β”€ Bi_LSTM/
β”œβ”€β”€ Linear_Svm/
β”œβ”€β”€ Logistic_Regression/
β”œβ”€β”€ Lstm/
β”œβ”€β”€ Naive Bayes/
β”œβ”€β”€ XGBoost/
└── Notebooks/

Available Models

  • BERT
  • LSTM
  • Bi-LSTM
  • Logistic Regression
  • Linear SVM
  • Naive Bayes
  • XGBoost

Using the BERT Model

from transformers import pipeline

classifier = pipeline(
    "text-classification",
    model="Sudheer17/Sentiment/BERT"
)

result = classifier("I love this movie!")

print(result)

Example Output

[{'label': 'Positive', 'score': 0.9848}]

Example Inputs

I love this movie!
This is the worst experience ever.
The service was average.

Notes

  • The BERT model can be loaded directly using the Hugging Face Transformers library.
  • Classical Machine Learning and Deep Learning models are stored in their respective folders.
  • Use the appropriate tokenizer and preprocessing pipeline when working with non-BERT models.

Requirements

transformers
torch
tensorflow
scikit-learn
joblib
numpy
pandas

Install them using:

pip install transformers torch tensorflow scikit-learn joblib numpy pandas

License

This repository is released under the MIT License.

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support