A Discord bot that generates FULL powerpoints about a given subject thanks to openai's gpt3.
- 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
IMPORTANT Linux and MacOS installation isn't documented yet, if anyone wanths to complete it, feel free to do a pull request.
- Python 3.8 https://www.python.org/downloads/
- Pip https://pip.pypa.io/en/stable/installation/
- A Discord bot token https://www.writebots.com/discord-bot-token/
- An openai api key https://help.openai.com/en/articles/4936850-where-do-i-find-my-secret-api-key
- (Optional) An Nvidia GPU (for local image generation)
- 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
- 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 thestable-diffusion-ui
folder - Open the file called
Dev Console.cmd
in thestable-diffusion-ui
folder and run the following commands:
pip install uvicorn
pip install fastapi
- In the file
.env
, set theUSE_IMAGES
variable tosd
- In the file
.env
, set theUSE_IMAGES
variable todalle
- Run the
main.py
file with :
python main.py
- Open the file called
Dev Console.cmd
in thestable-diffusion-ui
folder and run the following commands:
uvicorn main:app --reload
-
/present
: Generates a pdf presentation about the given subjectOptions:
subject
: The subject of the presentationlanguage
: 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
You can join our discord server if you need help https://discord.gg/pB6hXtUeDv
Have fun!