Run this model with HF Jobs

Run chawki17/My_Sentiment_Analysis_Model on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.

Paste one of these prompts into your coding agent:

Fine-tune on my dataset

Use HF Jobs to fine-tune https://huggingface.co/chawki17/My_Sentiment_Analysis_Model. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.

Run batch inference

Use HF Jobs to run batch inference with https://huggingface.co/chawki17/My_Sentiment_Analysis_Model on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
File size: 2,626 Bytes
86443fc
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
761c2d1
86443fc
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
---
license: apache-2.0
datasets:
- chawki17/Electronic_Product_Reviews_data
language:
- en
metrics:
- accuracy
- precision
- recall
- f1
base_model:
- chawki17/my_sentiment_model
pipeline_tag: text-classification
library_name: transformers
---
# Sentiment Analysis Model

This model is a fine-tuned version of DistilBERT for sentiment analysis. It classifies text into three categories: **Positive**, **Neutral**, and **Negative**.

## Model Details
- **Model Type**: DistilBERT (DistilBERT-base-uncased)
- **Fine-Tuning Task**: Sentiment Analysis
- **Classes**: 3 (Positive, Neutral, Negative)
- **Dataset**: Custom sentiment dataset with labeled "Positive", "Neutral", and "Negative" text data.

## Intended Use
This 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.

## Model Performance

This model was fine-tuned on a custom sentiment dataset. Below are its performance metrics :

- **Accuracy**: 0.91
- **F1-Score**: 0.89
- **Precision**: 0.89 
- **Recall**: 0.89 


## License
This model is licensed under the [MIT License](https://opensource.org/licenses/MIT).

## Usage

### Install Hugging Face Transformers

To use this model, you need to install the `transformers` library. You can do so with the following command:

```bash
pip install transformers
```

### Example Code to Use the Model

```python
from transformers import pipeline

# Load the sentiment-analysis pipeline
sentiment_analysis = pipeline("text-classification", model="chawki17/my_sentiment_model")

# Example text
text = "I love this product!"

# Predict sentiment
result = sentiment_analysis(text)
print(result)
```

### Inputs and Outputs
- **Input**: A string of text (e.g., a customer review).
- **Output**: A sentiment label (Positive, Neutral, or Negative) with confidence score.

Example output:

```json
[{'label': 'POSITIVE', 'score': 0.98}]
```

## Limitations
- The model may not perform well on text data from domains that were not part of the training set.
- It may not generalize well to very short texts or highly domain-specific language.
- The model is based on English text data and may not work well for other languages.

## Model Card and Documentation
For more details on this model and its performance, visit the [model page on Hugging Face](https://huggingface.co/chawki17/my_sentiment_model).

## Acknowledgements
- This model was fine-tuned using the DistilBERT architecture.
- The dataset was custom-built for this sentiment analysis task.