File size: 1,930 Bytes
627cb46 49770fe 3fc9390 49770fe 3fc9390 49770fe 3fc9390 49770fe 3fc9390 49770fe 3fc9390 49770fe 3fc9390 49770fe 3fc9390 49770fe 3fc9390 49770fe 3fc9390 49770fe 3fc9390 49770fe 3fc9390 49770fe 3fc9390 49770fe 2d26800 3fc9390 49770fe 3fc9390 49770fe 3fc9390 49770fe 839d57c |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 |
---
license: mit
datasets:
- mteb/tweet_sentiment_extraction
language:
- en
metrics:
- accuracy
base_model:
- openai-community/gpt2
pipeline_tag: text-classification
library_name: transformers
---
# GPT-2 Sentiment Analysis for Tweets
## Model Details
- **Model Type**: GPT-2 (Fine-tuned for sentiment analysis)
- **Model Architecture**: Transformer-based language model (GPT-2)
- **Fine-tuned On**: `mteb/tweet_sentiment_extraction` dataset
- **Intended Task**: Sentiment Classification (Tweet Sentiment)
## Model Overview
This model is a fine-tuned version of GPT-2, trained to classify tweets into sentiment categories. The model was fine-tuned on the **mteb/tweet_sentiment_extraction** dataset, which contains labeled tweets for sentiment analysis.
The model performs the task of classifying tweets into three sentiment categories:
- **Negative**: Label 0
- **Neutral**: Label 1
- **Positive**: Label 2
This model is suitable for analyzing sentiment in short-form text such as tweets, product reviews, or customer feedback.
## Intended Use
The model can be used for the following purposes:
- **Sentiment analysis** of short texts (e.g., tweets, reviews, feedback).
- **Customer feedback analysis** to classify sentiment in user comments.
- **Social media monitoring** to track the sentiment of public opinion about topics, brands, or products.
## How to Use
You can use the model with the Hugging Face `pipeline` API to classify the sentiment of a text input.
#### Example:
```python
from transformers import pipeline
# Load the fine-tuned model
classifier = pipeline("text-classification", model="riturajpandey739/gpt2-sentiment-analysis-tweets")
# Example text for sentiment classification
text = "This product is amazing! I absolutely love it."
# Get the sentiment prediction
result = classifier(text)
# Output the result
print(result)
# Example Output: [{'label': 'LABEL_2', 'score': 0.9976001381874084}]
|