Classify News Articles into different 14 categories. The data was taken from Kaggle which contained only title and categories so we Scraped that data to include article contents. The data can be found here: News Article Category Dataset
The dataset contains mainly columns about, category, title and body. The category column contains the category the article, title contains the title of the article and body contains the contents of the article. There are total of 6877 data samples of 14 categories: ARTS & CULTURE, BUSINESS, COMEDY, CRIME, EDUCATION, ENTERTAINMENT, ENVIRONMENT, MEDIA, POLITICS, RELIGION, SCIENCE, SPORTS, TECH, WOMEN.
Selected Model: Logistic Regression
Model Accuracy (test): 79.57%
- Clone the repository into your local machine.
git clone https://github.com/TimilsinaBimal/News-Article-Classifier.git
- Inside Main Directory create a virtual environment.
python -m venv <venv_name>
- Install all the dependencies.
pip install -r requirements.txt
- Go to
src/api/
and run
uvicorn main:app --reload
- Go to
src/web/
and run into your local machineindex.html
file. - Head to Chrome or any browser and go to your local server and follow the instructions
- To Run in CLI, Go to
src/api/
and run
python make_predictions.py