Beehzod commited on
Commit
c533c63
·
verified ·
1 Parent(s): 7b13ddd

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +38 -14
README.md CHANGED
@@ -1,11 +1,10 @@
1
  ---
 
2
  language: en
3
  tags:
4
  - sentiment-analysis
5
  - distilbert
6
  - transformers
7
- license: mit
8
- license_file: LICENSE
9
  datasets:
10
  - imdb
11
  metrics:
@@ -18,19 +17,44 @@ model_type: distilbert
18
 
19
  # Fine-tuned DistilBERT for Sentiment Analysis
20
 
21
- **Model Description**: A fine-tuned DistilBERT model for sentiment analysis on the IMDB dataset, capable of classifying movie reviews as positive or negative.
 
22
 
23
- ## Model Details
24
- - **Model Type**: Transformer-based model (DistilBERT)
25
- - **Number of Labels**: 2 (Positive and Negative)
26
- - **Training Dataset**: IMDB Reviews
 
27
 
28
- ## Training
29
- - **Training Data Size**: 20,000 samples for training and 5,000 samples for evaluation.
30
- - **Training Procedure**: The model was fine-tuned for 3 epochs with a batch size of 16.
31
- - **Evaluation Metrics**: Accuracy, Precision, Recall, F1-score.
 
 
 
 
 
 
 
 
 
 
32
 
33
  ## Usage
34
- ### Installation
35
- ```bash
36
- pip install transformers
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+ license: apache-2.0
3
  language: en
4
  tags:
5
  - sentiment-analysis
6
  - distilbert
7
  - transformers
 
 
8
  datasets:
9
  - imdb
10
  metrics:
 
17
 
18
  # Fine-tuned DistilBERT for Sentiment Analysis
19
 
20
+ ## Model Description
21
+ This model is a fine-tuned version of DistilBERT for sentiment analysis tasks. It was trained on the IMDB dataset to classify movie reviews as **positive** or **negative**. It can be used in applications where text sentiment analysis is needed, such as social media monitoring or customer feedback analysis.
22
 
23
+ - **Model Architecture**: DistilBERT (transformer-based model)
24
+ - **Task**: Sentiment Analysis
25
+ - **Labels**:
26
+ - **Positive**
27
+ - **Negative**
28
 
29
+ ## Training Details
30
+ - **Dataset**: IMDB movie reviews dataset
31
+ - **Training Data Size**: 20,000 samples for training and 5,000 samples for evaluation
32
+ - **Epochs**: 3
33
+ - **Batch Size**: 16
34
+ - **Learning Rate**: 2e-5
35
+ - **Optimizer**: AdamW with weight decay
36
+
37
+ ## Evaluation Metrics
38
+ The model was evaluated on a held-out test set using the following metrics:
39
+ - **Accuracy**: 0.95
40
+ - **F1 Score**: 0.94
41
+ - **Precision**: 0.93
42
+ - **Recall**: 0.92
43
 
44
  ## Usage
45
+
46
+ ### Example Code
47
+ To use this sentiment analysis model with the Hugging Face Transformers library:
48
+
49
+ ```python
50
+ from transformers import pipeline
51
+
52
+ # Load the model from the Hugging Face Hub
53
+ sentiment_pipeline = pipeline("sentiment-analysis", model="Beehzod/smart_sentiment_analysis")
54
+
55
+ # Example predictions
56
+ text = "This movie was fantastic! I really enjoyed it."
57
+ results = sentiment_pipeline(text)
58
+
59
+ for result in results:
60
+ print(f"Label: {result['label']}, Score: {result['score']:.4f}")