Giter Club home page Giter Club logo

chatbot-flask's Introduction

A Simple ChatBot using ChatterBot and Flask

What is a ChatBot?

A chatbot is a computer program that conducts the conversation between the user and a computer by using textual or auditory means. It works as a real-world conversational partner.

You have seen different chatbots in your life Siri, Cortana, Alexa, and so forth. As per a review, the chatbot is required to finish around 80% of all works in the coming decades. Presently, chatbots are practically finishing 30% of the tasks. With the expanding boom, it has turned out to be imperative to learn Machine Learning and Artificial Intelligence.

Working of ChatterBot

ChatterBot is a Python library that makes it easy to generate automated responses to a user’s input. ChatterBot uses a selection of machine learning algorithms to produce different types of responses. This makes it easy for developers to create chat bots and automate conversations with users. The language independent design of ChatterBot allows it to be trained to speak any language. Additionally, the machine-learning nature of ChatterBot allows an agent instance to improve it’s own knowledge of possible responses as it interacts with humans and other sources of informative data.

The chatterbot works in the following manner:

  • Get the input from the user.
  • Process the input.
  • Returns the value that is generated with the highest confidence value.
  • Return the response to the user.

Working of the Project

First, the chatbot is trained with a set of training data present in /data directory and creates a sqlite3 database. When the users inputs a query the bot searches for a response from the database if it finds an answer then it prints the response or else it will search for an answer from Wikipedia using web scraping and provide an appropriate response.

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. Make sure you have Python installed on your machine.

Setting up the Project

  • Clone the repository using
git clone https://github.com/VRohit1901/ChatBot-Flask
  • Open the terminal/cmd and navigate to the project folder.
cd ChatBot-Flask
  • Install the requirments.txt using
pip install requirments.txt
  • Requirments.txt will install all the required dependancies.

Usage

  • Now run the chatbot.py using
python chatbot.py

Congrats! The app should now be running on http://localhost:5000

  • Open http://localhost:5000 in your browser to interact with the chatbot.

Preview

Screenshot

How do I deploy this to a web server?

If you do not have a dedicated server, I highly recommend using PythonAnywhere, AWS or Heroku to host your application.

Reference

Contributing

Contributions are what make the open-source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

  1. Fork the Project
  2. Create your Branch
  3. Commit your changes
  4. Push to the Branch
  5. Open a Pull Request

License

Distributed under the GNU General Public License v3.0. See LICENSE for more information.

chatbot-flask's People

Contributors

vrohit1901 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.