sasankaweera123 / website_chatbot

This project is a chatbot web application that uses PyTorch, Flask, and NLTK to provide a conversational interface for users to interact with the chatbot and receive responses based on predefined patterns and intents.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Chatbot Web Application

This is a chatbot web application built using Flask, PyTorch, and NLTK. It provides a chat interface where users can interact with the chatbot to get responses based on the provided patterns and intents.

First Image Second Image

Features

  • Allows users to have a conversation with the chatbot.
  • Provides responses based on the trained model and predefined intents.
  • Handles user input and displays chat messages in real-time.

Prerequisites

  • Python 3.6 or higher
  • Flask
  • PyTorch
  • NLTK
  • TorchVision

Getting Started

  1. Clone the repository:
git clone https://github.com/sasankaweera123/website_chatbot.git
  1. Install the required dependencies:

pip install -r requirements.txt

  1. Train the chatbot model:

    • Update the intents.json file with your own intents, patterns, and responses.

    • Run the train_chatbot.py script to train the model:

      python train_chatbot.py

  2. Run the web application:

python app.py

  1. Open your browser and navigate to http://localhost:5000 to access the chatbot interface.

Usage

  • Type your message in the input field and press Enter or click the Send button to send your message to the chatbot.
  • The chat messages will be displayed in the chatbox.
  • The chatbot will respond with an appropriate message based on the provided patterns and intents.

Customization

  • To customize the chatbot behavior, update the intents.json file with your own intents, patterns, and responses.
  • You can modify the HTML template (base.html) and CSS styles (style.css) to change the appearance of the chatbox interface.

License

License

Acknowledgments

  • This project is based on the tutorial by patrickloeber on building a chatbot with PyTorch and Flask. Thank you for the helpful tutorial and code examples!

About

This project is a chatbot web application that uses PyTorch, Flask, and NLTK to provide a conversational interface for users to interact with the chatbot and receive responses based on predefined patterns and intents.

License:Apache License 2.0


Languages

Language:Python 69.7%Language:CSS 15.0%Language:JavaScript 10.1%Language:HTML 5.2%