Real-time news headline classification using a fine-tuned BERT transformer model.
Fine-tune bert-base-uncased on the AG News dataset to classify news headlines into 4 topic categories:
bert-base-uncased tokenizer with padding and truncation to 128 tokens.bert-base-uncased (110M parameters) using the Hugging Face Trainer API with learning rate scheduling, weight decay, and early stopping.| Metric | Score |
|---|---|
| Test Accuracy | ~94% |
| Macro F1-Score | ~0.94 |
| Training Epochs | 3 |
Results may vary slightly depending on hardware and random seeds.
pip install -r requirements.txt
python train.py
streamlit run app.py
NewsLens/
├── app.py # Streamlit UI for live inference
├── train.py # Training & evaluation script
├── requirements.txt # Python dependencies
└── README.md # Project documentation
Built as part of the DevelopersHub Corporation AI/ML Engineering Internship.
Real-time news headline classification using a fine-tuned BERT transformer model.
Fine-tune bert-base-uncased on the AG News dataset to classify news headlines into 4 topic categories:
bert-base-uncased tokenizer with padding and truncation to 128 tokens.bert-base-uncased (110M parameters) using the Hugging Face Trainer API with learning rate scheduling, weight decay, and early stopping.| Metric | Score |
|---|---|
| Test Accuracy | ~94% |
| Macro F1-Score | ~0.94 |
| Training Epochs | 3 |
Results may vary slightly depending on hardware and random seeds.
pip install -r requirements.txt
python train.py
streamlit run app.py
NewsLens/
├── app.py # Streamlit UI for live inference
├── train.py # Training & evaluation script
├── requirements.txt # Python dependencies
└── README.md # Project documentation
Built as part of the DevelopersHub Corporation AI/ML Engineering Internship.