Code Monkey home page Code Monkey logo

ai-chatbot's Introduction

ai-chatbot

This is a Q&A chatbot that you can run and ask questions about information from Wikipedia.

See detailed design documentation here

Prerequisites

  • Python 3.6+
  • Pip3

How to use

First, you will need to install Postgres and run a data server with a database. For Mac users:

  • Option 1: You can download and install Postgres.app. Launch the app and click "Initialize" to start a data server. A database will automatically be created for you.
  • Option 2: Install Postgres with Homebrew
    • brew install postgresql
    • brew services start postgresql

Then you need to clone (or download) this repository, go to the root directory of this project on your machine, and run pip3 install -r requirements.txt.

Run python3 ./data_loader.py <dbname> first to load the data in the database. As output, you should see a list of titles of Wikipedia pages that you can ask questions about with the CLI.

Finally, run python3 ./cli.py <dbname> to start the CLI, and it should prompt you to start asking questions.

You can try some questions like:

  • What is Anarchism?
  • What is Aristotle famous for?
  • Who was Achilles' mother?
  • Who was Thetis?

Note: If you want to load more topics (Wikipedia pages) in the database, you can modify this code line before running data_loader.py.

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.