Skip to content

This repository host a source code allowing to generate memes by AI

License

Notifications You must be signed in to change notification settings

PawelPeczek/AIMemesGenerator

Repository files navigation

AIMemesGenerator

This repository host a source code allowing to generate memes by AI.

How the tool works?

User provides list of image descriptions that will be used to generate meme components using Open AI Dall-E 2. Along with images description, user needs to provide texts visible in specific parts of the meme - number of texts determine number of meme elements (blank should be provided if image is intended to be placed without text). If more texts than images will be provided - then images will be looped as if the list of descriptions was cyclic. Results will be dumped into pointed directory.

Example result

Cat and dog meme

Installation

pip install git+https://github.com/PawelPeczek/AIMemesGenerator.git

Usage example

Prerequisites

To use the tool - you must create OpenAI API account and then export API key in environment variable:

export OPENAI_API_KEY=<your_api_key>

Command

ai_memes_generator \
  --title "Cats and dogs" \
  --image-description "cute dog everyone will love" --meme-text "Having dog" \
  --image-description "cute dog everyone will love" --meme-text "you own dog" \
  --image-description "cute cat everyone will love" --meme-text "Having cat" \
  --image-description "evil cat" --meme-text "cat owns you" \
  --columns-number 2 \
  --variants-number 4 \
  --target-directory ./assets

About

This repository host a source code allowing to generate memes by AI

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages