Sentiment / README.md
Sudheer17's picture
Create README.md
02445dd verified
|
Raw
History Blame Contribute Delete
1.56 kB
---
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.