--- license: mit library_name: transformers pipeline_tag: text-classification --- # 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 ```python from transformers import pipeline classifier = pipeline( "text-classification", model="Sudheer17/Sentiment/BERT" ) result = classifier("I love this movie!") print(result) ``` Example Output ```python [{'label': 'Positive', 'score': 0.9848}] ``` --- # Example Inputs ```text I love this movie! ``` ```text This is the worst experience ever. ``` ```text 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: ```bash pip install transformers torch tensorflow scikit-learn joblib numpy pandas ``` --- # License This repository is released under the MIT License.