Skip to content

A chatbot application to handle plane tickets booking and hotels reservations

License

Notifications You must be signed in to change notification settings

AyoubTe/chatbot

Repository files navigation

Chatbot

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.

Table of Contents

Features

  • 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

Installation

Prerequisites

  • Python 3.7+
  • pip

Backend Setup

  1. Clone the repository:

    git clone https://github.com/AyoubTe/chatbot.git
    cd chatbot
  2. Create a virtual environment and activate it:

    python -m venv venv
    source venv/bin/activate  # On Windows, use `venv\Scripts\activate`
  3. Install the required Python packages:

    pip install -r requirements.txt
  4. Download NLTK data:

    import nltk
    nltk.download('punkt')
  5. Train the model (if not already trained):

    python train.py
  6. Run the Flask application:

    python app.py

Frontend Setup

  1. Navigate to the static folder:

    cd static
  2. Install frontend dependencies:

    npm install

Usage

  1. Start the Flask server:

    python app.py
  2. Open your browser and navigate to http://127.0.0.1:5000/ to interact with the chatbot.

  3. Use the chat interface to ask questions, make reservations, and more.

Project Structure

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

About

A chatbot application to handle plane tickets booking and hotels reservations

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published