This API is a wrapper for the textgenrnn meme generation models available here
Build the Docker image with the following command
docker build . -t memegen-backend
Run the API on port 5000
docker run -it -p 5000:5000 --rm memegen-backend
The API will then be available at http://localhost:5000
The API has a single endpoint /meme/{template_id}/{temperature}
template_id
: a string representing the template to be used. Currently onlydrake
is supported. Edit theMemeTemplate
enum to add moretemperature
: controls how "creative" the model is. See the textgenrnn documentation for details
The API response had the following format:
{
"top": first text box,
"bottom": second text box,
"image": base 64 image
}
If you want to run the API on HTTPS (and use a custom domain) run it with docker-compose up --build
Before running docker-compose
update the variables YOUR_EMAIL
and YOUR_DOMAIN
in docker-compose.yml