Git Product home page Git Product logo

philosophy_chatbot's Introduction

Philosophy Chatbot

This project is a simple philosophy chatbot that provides quotes based on different themes. The chatbot uses a machine learning model to classify user input into predefined categories and responds with relevant philosophical quotes.

Overview

The philosophy chatbot allows users to interact with it by asking for quotes on various philosophical themes. It uses a pre-trained model to classify user input and deliver quotes accordingly. You can also train the model with new intents using the provided script.

Features

  • Quote Generation: Provides quotes from various philosophical themes and authors.
  • User Interaction: Simple command-line interface for interacting with the chatbot.
  • Model Training: Train the chatbot on new intents using the training.py script.

Setup

To set up and use the chatbot, follow these steps:

  1. Clone the Repository

    git clone https://github.com/yourusername/philosophy-chatbot.git
    cd philosophy-chatbot
  2. Install Dependencies

    Install the required Python packages using pip. Ensure you have Python 3.6+.

    pip install -r requirements.txt
  3. Prepare Data

    Ensure you have the intents.json file with the correct format for intents and responses.

  4. Train the Model For a simple use, you don't need to train the model. Use the training.py script to train the model on the data provided in intents.json. This script will generate the necessary model, tokenizer, and label encoder files.

    python training.py
  5. Run the Chatbot

    Once the model is trained, you can start the chatbot using:

    python chatbot.py

    To exit the chat, type quit.

    Start messaging with the bot (type 'quit' to stop)!
    User: Tell me a quote about love
    

File Structure

  • chatbot.py: Main script to run the chatbot. It loads the trained model and interacts with the user.

  • training.py: Script to train the model using the data from intents.json. It saves the model, tokenizer, and label encoder.

  • intents.json: File containing the philosophical themes and quotes.

  • chatbot.keras: Saved Keras model file (generated by training.py).

  • tokenizer.pickle: Saved tokenizer object (generated by training.py).

  • label_encoder.pickle: Saved label encoder object (generated by training.py).

  • requirements.txt: List of Python dependencies needed for the project.

    ChatBot: "The only thing we have to fear is fear itself." - Franklin D. Roosevelt

philosophy_chatbot's People

Contributors

annapreto23 avatar

Stargazers

 avatar

Watchers

 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.