Instructions to use Sudheer17/Sentiment with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Sudheer17/Sentiment with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="Sudheer17/Sentiment")# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("Sudheer17/Sentiment", device_map="auto") - Notebooks
- Google Colab
- Kaggle
| 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. |