Coder Social home page Coder Social logo

paillat-dev / presentator Goto Github PK

View Code? Open in Web Editor NEW
22.0 4.0 8.0 12.54 MB

A Discord bot that generates FULL powerpoints about a given subject thanks to openai's gpt3

License: MIT License

Python 95.75% Dockerfile 4.25%
bot chat-gpt chatgpt discord discord-bot gpt-3 gpt3 marp marpit marpit-markdown

presentator's Introduction

Presentator

A Discord bot that generates FULL powerpoints about a given subject thanks to openai's gpt3.

How it works

  • The bot sends a request to the openai api with the given subject and indications in the marp markdown format
  • We extract the images from the markdown and send them to the image generation api
  • We generate the pdf and html files from the markdown
  • We send the pdf and html files to the user

How to install

IMPORTANT Linux and MacOS installation isn't documented yet, if anyone wanths to complete it, feel free to do a pull request.

Requirements

Installation

  • Clone the repository
  • Install the requirements with pip install -r requirements.txt
  • Download the correct zip / tar marp file for your os here.
  • Extract the content of that file in the presentator folder (the one you downloaded on step 1).
  • Restart your computer
  • Put your openai api key and discord bot token in the .env.example file and rename it to .env

Image generation (optional)

With Stable Diffusion UI (powerful gpu option)

  • Do not use this option if you don't understand what you are doing!
  • Install Stable Diffusion UI and switch to the beta branch.
  • Copy the ./image_gen_api/main.py file to the stable-diffusion-ui folder
  • Open the file called Dev Console.cmd in the stable-diffusion-ui folder and run the following commands:
pip install uvicorn
pip install fastapi
  • In the file .env, set the USE_IMAGES variable to sd

With DALL·E 2 (costs dalle credits)

  • In the file .env, set the USE_IMAGES variable to dalle

Running

  • Run the main.py file with :
python main.py

Local image generation (optional, only if you use the local image generation option)

  • Open the file called Dev Console.cmd in the stable-diffusion-ui folder and run the following commands:
uvicorn main:app --reload

Commands

  • /present : Generates a pdf presentation about the given subject

    Options:

    • subject : The subject of the presentation
    • language : The language of the presentation (default: english)
    • style : The style of the presentation (default: default)
    • indications : Some more instructions about how the presentation should be generated (default: None)
  • /list : Lists all of your presentations

  • /get : Gets a presentation by its id another time

Help

You can join our discord server if you need help https://discord.gg/pB6hXtUeDv

Have fun!

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.