Thareesh Prabakaran
commited on
Update README.md
Browse files
README.md
CHANGED
|
@@ -16,25 +16,17 @@ This model classifies BBC news articles into five categories: Business, Entertai
|
|
| 16 |
|
| 17 |
## Dataset
|
| 18 |
|
| 19 |
-
The model is trained on the BBC News dataset
|
| 20 |
|
| 21 |
-
- Train Dataset
|
| 22 |
-
|
| 23 |
-
- Test Dataset: Contains unlabeled news articles for evaluation.
|
| 24 |
|
| 25 |
## Model Details
|
| 26 |
|
| 27 |
-
- Base Model
|
| 28 |
-
|
| 29 |
-
-
|
| 30 |
-
|
| 31 |
-
- Training Framework: TensorFlow with Hugging Face Transformers
|
| 32 |
-
|
| 33 |
-
- Fine-Tuning Epochs: 5
|
| 34 |
-
|
| 35 |
-
- Batch Size: 16
|
| 36 |
-
|
| 37 |
-
- Optimizer: Adam with Learning Rate Scheduling
|
| 38 |
|
| 39 |
## How to Use
|
| 40 |
|
|
@@ -45,16 +37,18 @@ from transformers import pipeline
|
|
| 45 |
|
| 46 |
classifier = pipeline("text-classification", model="NotThareesh/BBC-News-Classifier-BERT")
|
| 47 |
|
|
|
|
|
|
|
| 48 |
text = "The stock market saw a significant rise today after tech companies reported high earnings."
|
| 49 |
result = classifier(text)
|
| 50 |
-
|
|
|
|
| 51 |
```
|
| 52 |
|
| 53 |
## Model Performance
|
| 54 |
|
| 55 |
-
- Accuracy
|
| 56 |
-
|
| 57 |
-
- Evaluation: The model performs consistently on Precision, Recall, and F1-score.
|
| 58 |
|
| 59 |
## License
|
| 60 |
|
|
|
|
| 16 |
|
| 17 |
## Dataset
|
| 18 |
|
| 19 |
+
The model is trained on the **BBC News dataset**, which consists of categorized news articles. The dataset contains training and test splits.
|
| 20 |
|
| 21 |
+
- **Train Dataset**: Contains labeled news articles.
|
| 22 |
+
- **Test Dataset**: Contains unlabeled news articles for evaluation.
|
|
|
|
| 23 |
|
| 24 |
## Model Details
|
| 25 |
|
| 26 |
+
- **Base Model**: bert-base-uncased
|
| 27 |
+
- **Training Framework**: PyTorch with Hugging Face Transformers
|
| 28 |
+
- **Batch Size**: 16
|
| 29 |
+
- **Optimizer**: Adam with Learning Rate Scheduling
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 30 |
|
| 31 |
## How to Use
|
| 32 |
|
|
|
|
| 37 |
|
| 38 |
classifier = pipeline("text-classification", model="NotThareesh/BBC-News-Classifier-BERT")
|
| 39 |
|
| 40 |
+
labels = {"LABEL_0": "Business", "LABEL_1": "Entertainment", "LABEL_2": "Politics", "LABEL_3": "Sport", "LABEL_4": "Tech"}
|
| 41 |
+
|
| 42 |
text = "The stock market saw a significant rise today after tech companies reported high earnings."
|
| 43 |
result = classifier(text)
|
| 44 |
+
|
| 45 |
+
print(f"Predicted Label: {labels[result[0]['label']]}, Accuracy Score: {result[0]['score']}") # Predicted Label: Business, Accuracy: 0.996
|
| 46 |
```
|
| 47 |
|
| 48 |
## Model Performance
|
| 49 |
|
| 50 |
+
- **Accuracy**: Achieved over 99% accuracy on the validation dataset.
|
| 51 |
+
- **Evaluation**: The model performs consistently on Precision, Recall, and F1-score.
|
|
|
|
| 52 |
|
| 53 |
## License
|
| 54 |
|