chawki17/My_Sentiment_Analysis_Model
08
1---2license: apache-2.03datasets:4- chawki17/Electronic_Product_Reviews_data5language:6- en7metrics:8- accuracy9- precision10- recall11- f112base_model:13- chawki17/my_sentiment_model14pipeline_tag: text-classification15library_name: transformers16---17# Sentiment Analysis Model18 19This model is a fine-tuned version of DistilBERT for sentiment analysis. It classifies text into three categories: **Positive**, **Neutral**, and **Negative**.20 21## Model Details22- **Model Type**: DistilBERT (DistilBERT-base-uncased)23- **Fine-Tuning Task**: Sentiment Analysis24- **Classes**: 3 (Positive, Neutral, Negative)25- **Dataset**: Custom sentiment dataset with labeled "Positive", "Neutral", and "Negative" text data.26 27## Intended Use28This model can be used to classify text as **Positive**, **Neutral**, or **Negative**. It's ideal for applications that require sentiment classification, such as customer feedback analysis, reviews, or social media sentiment monitoring.29 30## Model Performance31 32This model was fine-tuned on a custom sentiment dataset. Below are its performance metrics :33 34- **Accuracy**: 0.9135- **F1-Score**: 0.8936- **Precision**: 0.89 37- **Recall**: 0.89 38 39 40## License41This model is licensed under the [MIT License](https://opensource.org/licenses/MIT).42 43## Usage44 45### Install Hugging Face Transformers46 47To use this model, you need to install the `transformers` library. You can do so with the following command:48 49```bash50pip install transformers51```52 53### Example Code to Use the Model54 55```python56from transformers import pipeline57 58# Load the sentiment-analysis pipeline59sentiment_analysis = pipeline("text-classification", model="chawki17/my_sentiment_model")60 61# Example text62text = "I love this product!"63 64# Predict sentiment65result = sentiment_analysis(text)66print(result)67```68 69### Inputs and Outputs70- **Input**: A string of text (e.g., a customer review).71- **Output**: A sentiment label (Positive, Neutral, or Negative) with confidence score.72 73Example output:74 75```json76[{'label': 'POSITIVE', 'score': 0.98}]77```78 79## Limitations80- The model may not perform well on text data from domains that were not part of the training set.81- It may not generalize well to very short texts or highly domain-specific language.82- The model is based on English text data and may not work well for other languages.83 84## Model Card and Documentation85For more details on this model and its performance, visit the [model page on Hugging Face](https://huggingface.co/chawki17/my_sentiment_model).86 87## Acknowledgements88- This model was fine-tuned using the DistilBERT architecture.89- The dataset was custom-built for this sentiment analysis task.