An intelligent chatbot built using Python and Flask for e-commerce platforms. It can handle user queries, assist with product navigation, and respond to common customer questions. The chatbot is integrated into a web interface with basic routes and templates.
- 🧠 NLP-based chatbot for intelligent responses
- 🛍️ Product page route (/product) with UI integration
- 💬 Chat interface via AJAX (Flask + JS)
- 🔍 Dynamic response system using JSON
- 📁 Modular code (chat logic, model training, and routes separated)
| Layer | Tech Used |
|---|---|
| Frontend | HTML5, CSS, JavaScript |
| Backend | Python, Flask |
| NLP | NLTK / custom model |
| Others | JSON, Pickle |
ecommerce-chatbot/
├── app.py # Main Flask app with route handling
├── chat.py # Chatbot logic and response generation
├── model.py # Handles model loading or predictions
├── train.py # Train chatbot with intents.json
├── nltk_utils.py # Tokenization, stemming, bag of words
├── data.pth # Trained model data (torch/pickle)
├── intents.json # Training data for chatbot
│
├── static/
│ ├── app.js # JS for frontend chat interaction
│ ├── style.css # Basic styling
│ └── images/ # Placeholder for any assets
│
├── templates/
│ ├── base.html # Homepage
│ └── product.html # Product page
│
└── venv/ # Virtual environment
git clone https://github.com/yourusername/ecommerce-chatbot.gitpython -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activatepip install flaskpython train.py
python app.pyVisit: http://127.0.0.1:5000
{
"tag": "greeting",
"patterns": ["Hi", "Hello", "Is anyone there?"],
"responses": ["Hello! How can I assist you today?"]
}Pull requests are welcome. Open issues for suggestions or bugs. Support Us https://aniclothe.roytechub.com/
Bidyut Roy 💼 Portfolio: https://github.com/roytechub