Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🤖 ChatBot Project — Flask + React + Machine Learning

A full-stack chatbot application built using Flask, React (Vite), and a machine-learning–based intent classification model.
The chatbot uses Natural Language Processing (NLP) with NLTK and a neural network trained using TensorFlow/Keras to generate intent-based responses.

The frontend provides a clean, ChatGPT-style user interface, while the backend handles both the chatbot API and serving the production frontend.


🚀 Live Demo

🔗 Deployed on Render
https://chatbot-001-xyz.onrender.com/

⚠️ Note: On Render’s free tier, the first request after inactivity may take a few seconds due to cold start.


✨ Features

  • Intent-based chatbot using Machine Learning
  • NLP preprocessing with NLTK (tokenization + stemming)
  • Neural network trained using TensorFlow/Keras
  • ChatGPT-style UI with dark/light theme toggle
  • FAQ quick-prompt buttons
  • Markdown support for bot responses
  • Single-service deployment (frontend + backend together)
  • Git LFS used for large ML model files
  • Render-optimized production setup

🏗️ Tech Stack

Frontend

  • React (Vite)
  • JavaScript (ES6+)
  • CSS (custom theme-based styling)

Backend

  • Python
  • Flask
  • Flask-CORS
  • Gunicorn

Machine Learning / NLP

  • TensorFlow / Keras
  • NLTK
  • Scikit-learn
  • Bag-of-Words model

Deployment

  • Dockerized application (frontend + backend bundled into a single container)
  • Render (Free Tier)
  • GitHub
  • Git Large File Storage (LFS)

📁 Project Structure

chatbot_project/
├── backend/
│   ├── app.py                 # Flask application entry point
│   ├── chat.py                # Chat response logic
│   ├── data_preprocessing.py  # NLP preprocessing (tokenization, stemming)
│   ├── init_model.py          # ML model loading & initialization
│   ├── intents.json           # Intent dataset
│   ├── model.weights.h5       # Trained model weights (tracked via Git LFS)
│   ├── data.pickle            # Vocabulary & labels (tracked via Git LFS)
│   ├── requirements.txt       # Backend & ML dependencies
│   ├── static/                # React (Vite) production build served by Flask
│   └── nltk_data/             # Runtime-downloaded NLTK data (ignored in Git)
│
├── frontend/
│   ├── src/                   # React source code
│   ├── dist/                  # Vite production build (copied to backend/static)
│   └── vite.config.js
│
├── Dockerfile                 # Single Dockerfile for full-stack deployment
├── .dockerignore              # Docker ignore rules
├── .gitattributes             # Git LFS configuration for large ML files
├── .gitignore
└── README.md

About

Developed a enquiry chatbot backend with Python and Frontend with Reactjs

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages