A simple chatbot application that can handle reservations, respond to general queries, and more. Built using Python, NLTK, PyTorch, and Flask for the backend, and HTML, CSS, and JavaScript for the frontend.
- Natural Language Processing with NLTK
- Neural Network model built with PyTorch
- Flask backend for handling chat requests
- Interactive frontend with HTML, CSS, and JavaScript
- Handles both English and French languages
- Context-aware responses for reservation requests
- Python 3.7+
- pip
-
Clone the repository:
git clone https://github.com/AyoubTe/chatbot.git cd chatbot -
Create a virtual environment and activate it:
python -m venv venv source venv/bin/activate # On Windows, use `venv\Scripts\activate`
-
Install the required Python packages:
pip install -r requirements.txt
-
Download NLTK data:
import nltk nltk.download('punkt')
-
Train the model (if not already trained):
python train.py
-
Run the Flask application:
python app.py
-
Navigate to the
staticfolder:cd static -
Install frontend dependencies:
npm install
-
Start the Flask server:
python app.py
-
Open your browser and navigate to
http://127.0.0.1:5000/to interact with the chatbot. -
Use the chat interface to ask questions, make reservations, and more.
chatbot/
│
├── static/
│ ├── chatbot-icon.svg
│ ├── main.css
│ └── script.js
│
├── templates/
│ └── base.html
│ └── index.html
├── app.py
├── model.py
├── nltk_utils.py
├── train.py
├── intents.json
├── data.pth
├── requirements.txt
└── README.md