Improve README formatting and add model link
Browse filesdistilbert-news-classifier-dheeraj is a lightweight and efficient text classification model fine-tuned from the distilbert-base-uncased transformer model. It is designed to categorize short news headlines into one of four major classes:
Sports
Business
Tech
Science
This project demonstrates how to quickly build and deploy a custom NLP classifier using the Hugging Face π€ ecosystem, including transformers, datasets, and Trainer.
The model was trained on a small synthetic dataset inspired by the AG News classification structure. Despite its limited size, the model showcases the capabilities of DistilBERT in low-resource settings and serves as a solid foundation for educational purposes or further fine-tuning with larger datasets.
README.md
CHANGED
@@ -1,15 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
# π DistilBERT News Classifier by Dheeraj
|
2 |
|
3 |
A text classification model fine-tuned on news headlines to classify them into one of four categories:
|
4 |
|
5 |
-
- 0 β Sports
|
6 |
-
- 1 β Business
|
7 |
-
- 2 β Tech
|
8 |
-
- 3 β Science
|
|
|
|
|
9 |
|
10 |
## π§ Model Info
|
11 |
|
12 |
-
This model is based on `distilbert-base-uncased` and trained using Hugging Face's `Trainer
|
|
|
|
|
13 |
|
14 |
## π Example Usage
|
15 |
|
@@ -18,5 +33,4 @@ from transformers import pipeline
|
|
18 |
|
19 |
classifier = pipeline("text-classification", model="Dheeraj3103/distilbert-news-classifier-dheeraj")
|
20 |
result = classifier("NASA finds evidence of water on Mars.")
|
21 |
-
print(result)
|
22 |
-
|
|
|
1 |
+
---
|
2 |
+
license: apache-2.0
|
3 |
+
language:
|
4 |
+
- en
|
5 |
+
metrics:
|
6 |
+
- accuracy
|
7 |
+
base_model:
|
8 |
+
- distilbert/distilbert-base-uncased-finetuned-sst-2-english
|
9 |
+
pipeline_tag: text-classification
|
10 |
+
library_name: transformers
|
11 |
+
---
|
12 |
# π DistilBERT News Classifier by Dheeraj
|
13 |
|
14 |
A text classification model fine-tuned on news headlines to classify them into one of four categories:
|
15 |
|
16 |
+
- **0 β Sports**
|
17 |
+
- **1 β Business**
|
18 |
+
- **2 β Tech**
|
19 |
+
- **3 β Science**
|
20 |
+
|
21 |
+
---
|
22 |
|
23 |
## π§ Model Info
|
24 |
|
25 |
+
This model is based on [`distilbert-base-uncased`](https://huggingface.co/distilbert-base-uncased) and trained using Hugging Face's `Trainer` API.
|
26 |
+
|
27 |
+
---
|
28 |
|
29 |
## π Example Usage
|
30 |
|
|
|
33 |
|
34 |
classifier = pipeline("text-classification", model="Dheeraj3103/distilbert-news-classifier-dheeraj")
|
35 |
result = classifier("NASA finds evidence of water on Mars.")
|
36 |
+
print(result)
|
|