News Headline Classifier
NLP app classifies news headlines (SPORTS, CRIME, EDUCATION, COMEDY) with 84% accuracy. Multinomial Naive Bayes + CountVectorizer, Gradio UI, Hugging Face Spaces deploy.
Overview
A Natural Language Processing application that automatically classifies news headlines into four categories: SPORTS, CRIME, EDUCATION, and COMEDY. Built using Multinomial Naive Bayes algorithm with CountVectorizer for text preprocessing, the application features a Gradio-based user interface and is deployed on Hugging Face Spaces for easy access.
Challenge
Headlines are short and noisy, which makes topic classification hard with limited context. The goal was a lightweight, fast text classifier for four news categories that anyone could try in the browser.
Solution
Multinomial Naive Bayes with CountVectorizer, exposed via Gradio and deployed on Hugging Face Spaces.
Architecture
CountVectorizer preprocessing · Multinomial Naive Bayes · Gradio UI · Hugging Face Spaces
Results
- Accuracy: 84%
- Categories: 4
- Algorithm: Multinomial Naive Bayes
- Achieved 84% accuracy on news headline classification
- Multinomial Naive Bayes with CountVectorizer preprocessing
- User-friendly Gradio interface
- Deployed on Hugging Face Spaces
- Real-time text classification capabilities
Technologies
- Python
- NLP
- Naive Bayes
- Gradio
- HuggingFace
- scikit-learn
Loading project…