Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

roytechub/chatbot-for-ecommerce-using-python

Open more actions menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

E-commerce Chatbot using Python & Flask

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.


🚀 Features

  • 🧠 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)

🛠️ Tech Stack

Layer Tech Used
Frontend HTML5, CSS, JavaScript
Backend Python, Flask
NLP NLTK / custom model
Others JSON, Pickle

📂 Project Structure

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

🧪 Getting Started

1️⃣ Clone the Repo

git clone https://github.com/yourusername/ecommerce-chatbot.git

2️⃣ Create Virtual Environment

python -m venv venv
source venv/bin/activate        # Windows: venv\Scripts\activate

3️⃣ Install Requirements

pip install flask

4️⃣ Train the Model (if needed) and Run the App

python train.py
python app.py

Visit: http://127.0.0.1:5000


Example Intents

{
  "tag": "greeting",
  "patterns": ["Hi", "Hello", "Is anyone there?"],
  "responses": ["Hello! How can I assist you today?"]
}

🤝 Contributing

Pull requests are welcome. Open issues for suggestions or bugs. Support Us https://aniclothe.roytechub.com/


Author

Bidyut Roy 💼 Portfolio: https://github.com/roytechub

☺️ Happy Coding

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Morty Proxy This is a proxified and sanitized view of the page, visit original site.