🧠 AI-Powered Multi-Class Text Classifier

Production-Ready NLP Pipeline & Deployment

Python TensorFlow Flask License

A sophisticated, end-to-end Natural Language Processing (NLP) system designed to categorize unstructured text into meaningful classes. This project bridges the gap between raw data and actionable intelligence using a combination of classical Machine Learning and state-of-the-art Deep Learning.


πŸš€ Key Features

  • Multi-Model Support: Compare results between Logistic Regression (TF-IDF) and Deep Learning (LSTM) architectures.
  • Advanced Preprocessing: Implements POS-aware lemmatization, tokenization, and stopword removal via a modular vectorized pipeline.
  • Smart Embeddings: Supports Word2Vec Skip-gram and GloVe representations for deep contextual understanding.
  • Premium UI: A modern, responsive web interface built with Glassmorphism and high-end typography for instant narrative analysis.
  • Scalable Architecture: Designed to handle datasets with millions of rows while maintaining high performance.

πŸ› οΈ Tech Stack

  • Core: Python 3.8+
  • NLP: NLTK, Gensim
  • Machine Learning: Scikit-Learn (TF-IDF, Logistic Regression, Random Forest)
  • Deep Learning: TensorFlow/Keras (LSTM, GRU, Word2Vec)
  • Deployment: Flask (Backend), Modern Vanilla CSS (Premium Frontend)

πŸ“‚ Project Structure

β”œβ”€β”€ Datasets/           # Training & Test CSV files (Standard: 'QA Text' & 'Class')
β”œβ”€β”€ models/             # Exported model "brains" (pkl, h5, tokenizer)
β”œβ”€β”€ templates/          # HTML templates for the Flask web application
β”œβ”€β”€ text_pipeline.py    # The core NLP engine (preprocessing & utilities)
β”œβ”€β”€ train_script.py     # High-speed training script with Stratified Sampling
β”œβ”€β”€ train.ipynb         # Interactive research & experimentation notebook
β”œβ”€β”€ app.py              # Flask deployment server
└── requirements.txt    # Project dependencies

🏁 Quick Start

1. Installation

Clone the repository and install the necessary libraries:

pip install -r requirements.txt

2. Training the "Brain"

You can train the models either interactively via the notebook or quickly via the terminal:

# High-speed stratified training
python train_script.py

3. Launching the Dashboard

Once the training is complete and artifacts are in the models/ folder:

python app.py

Visit http://127.0.0.1:5000 to start analyzing text!


πŸ§ͺ The "Chaotic Text" Test

The system is built to handle noise. Try pasting a "chaotic" sample like this to see how the model ignores noise and finds the core intent:

"MARKET ALERT! πŸ“‰ Stocks are tumbling as investors react... Should I diversify into gold?? #WallStreet #Investing"


πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.


Built with ❀️ for High-Performance NLP.

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support