Git Product home page Git Product logo

bookgpt's Introduction

BookGPT (Beta)

This program uses the GPT-3 API to generate books based on your specified parameters.

Installation

To install this program, simply follow these steps:

  1. Clone this repository to your local machine by running the following command in your terminal:
git clone https://github.com/mikavehns/BookGPT.git
  1. Navigate to the root directory of the repository using cd BookGPT/src
  2. Install the required dependencies by running the following command:
pip install -r requirements.txt

Prerequisites

In order to use this program, you must have a GPT-3 API key. The API Key must then be inserted into the config.json file.

Usage

To use this program, simply run the following command in your terminal:

python run.py

You will then be prompted to enter the following information:

  • Chapter Amount: The amount of chapters you want the book to have.
  • Chapter Length: The amount of words you want each chapter to have.
  • Topic: The topic you want the book to be about.
  • Category: The type of book you want to generate. (Science, Biography, etc.)

The program will then generate a Title and Chapter Titles + Content. You will get a detailed structure of the book. The generated books will then be saved in the books folder and will be named after the title of the book.

Examples

Here are some examples:

  • Generate book with 5 chapters and 300 words per chapter, with quotes as chapter title, with the topic "success":
the_path_to_success.mp4
  • You can see all examples in the examples/ directory.

Notes

  • The run.py file is just one example on how to use the book generator. You can also implement it into a website, discord bot, desktop app, etc.
  • The program may take some time to run, depending on the specified parameters and the performance of the GPT-3 API. Please be patient while the book is being generated.
  • The program may not always generate the wished amount of words for each chapter. This can happen, if there is not enough data available for the specified topic.
  • Currently, it is only possible to generate Non-Fiction books.
  • Since this is a really early version (v0.6.2), there are many missing features, that will be added by time

License

This project is licensed under the MIT License - see the LICENSE file for details.

Contributing

  • If you are interested in contributing to BookGPT, I welcome any suggestions or pull requests. Please feel free to open an issue or submit a pull request on the GitHub repository.
  • You can also submit your books, which I will then add to the examples folder. Just open a pull request with the book in the examples folder.

bookgpt's People

Contributors

mikavehns avatar

Watchers

James Cloos 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.