• Stars
    star
    265
  • Rank 153,709 (Top 4 %)
  • Language
    Python
  • License
    GNU General Publi...
  • Created about 1 year ago
  • Updated 9 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Uses Various AI Service APIs to generate memes with text and images

Full Stack AI Meme Generator

Allows you to automatically generate meme images from start to finish using AI. It will generate the text for the meme (optionally based on a user-provided concept), create a related image, and combine the two into a final image file.


Features

  • Uses OpenAI's GPT-4 to generate the text and image prompt for the meme.
  • Automatically sends image prompt request to an AI image generator of choice, then combines the text and image
  • Allows customization of the meme generation process through various settings.
  • Generates memes with a user-provided subject or concept, or you can let the AI decide.
  • Logs meme generation details for future reference.

Usage

  1. For Python Version Only: Clone the repository & Install the necessary packages.
  2. Obtain at least an OpenAI API key, but it is recommended to also use APIs from Clipdrop or Stability AI (DreamStudio) for the image generation stage.
  3. Edit the settings variables in the settings.ini file.
  4. Run the script and enter a meme subject or concept when prompted (optional).

Settings

Various settings for the meme generation process can be customized:

  • OpenAI API settings: Choose the text model and temperature for generating the meme text and image prompt.
  • Image platform settings: Choose the platform for generating the meme image. Options include OpenAI's DALLE2, StabilityAI's DreamStudio, and ClipDrop.
  • Basic Meme Instructions: You can tell the AI about the general style or qualities to apply to all memes, such as using dark humor, surreal humor, wholesome, etc.
  • Special Image Instructions: You can tell the AI how to generate the image itself (more specifically, how to write the image prompt). You can specify a style such as being a photograph, drawing, etc, or something more specific such as always using cats in the pictures.

Example Image Output With Log

Meme File Name: meme_2023-07-13-15-34_ZYKCV.png
AI Basic Instructions: You will create funny memes.
AI Special Image Instructions: The images should be photographic.
User Prompt: 'cats'
Chat Bot Meme Text: "When you finally find the perfect napping spot... on the laptop."
Chat Bot Image Prompt: "A photograph of a cat laying down on an open laptop."
Image Generation Platform: clipdrop

Optional Arguments

You can also pass options into the program via command-line arguments whether using the python version or exe version.

β€’ API Key Arguments: Not necessary if the keys are already in api_keys.ini

--openaikey: OpenAI API key.

--clipdropkey: ClipDrop API key.

--stabilitykey: Stability AI API key.

β€’ Basic Meme Arguments

--userprompt: A meme subject or concept to send to the chat bot. If not specified, the user will be prompted to enter a subject or concept.

--memecount: The number of memes to create. If using arguments and not specified, the default is 1.

β€’ Advanced Meme Settings Arguments

--imageplatform: The image platform to use. If using arguments and not specified, the default is 'clipdrop'. Possible options: 'openai', 'stability', 'clipdrop'.

--temperature: The temperature to use for the chat bot. If using arguments and not specified, the default is 1.0.

--basicinstructions: The basic instructions to use for the chat bot. If using arguments and not specified, the default is "You will create funny memes that are clever and original, and not cliche or lame.".

--imagespecialinstructions: The image special instructions to use for the chat bot. The default is "The images should be photographic.".

β€’ Binary arguments: Just adding them activates them, no text needs to accompany them

--nouserinput: If specified, this will prevent any user input prompts, and will instead use default values or other arguments.

--nofilesave: If specified, the meme will not be saved to a file, and only returned as virtual file part of memeResultsDictsList.

How to Build Exe Yourself

Note: To build the exe you have to set up the python environment anyway, so by that point you can just run the python version of the script. But if you want the build the exe yourself anyway here is how:

  1. Ensure required packages are installed
  2. Additionally, install PyInstaller: pip install pyinstaller (If using a virtual environment, install it into that)
  3. Run this command in terminal from within the project directory: python -m PyInstaller main.spec

More Repositories

1

YT-Spammer-Purge

Allows you easily scan for and delete scam comments using several methods.
Python
4,529
star
2

Auto-Synced-Translated-Dubs

Automatically translates the text of a video based on a subtitle file, and also uses AI voice to dub the video, and synced using the subtitle's timings
Python
1,534
star
3

youtube-dl-easy

Easy script for running youtube-dl with basic options
PowerShell
149
star
4

F-Key-Sender

Lets you send keystrokes for F13 to F24 keys via buttons, including with modifiers
C#
108
star
5

SRT-To-SSML

Converts SRT subtitle file to SSML file with speech durations
Python
85
star
6

YT-Spam-Lists

List of known domains used in scam comments on YouTube
80
star
7

LibWebpToolsGUI

Basic GUI wrappers for certain LibWebp binaries to handle WebP image files
C#
69
star
8

Basic-OpenAI-API-Scripts

Basic scripts for interacting with the OpenAI API.
Python
42
star
9

ThioJoe-Official-Certificates

A list of my self-signed certificates and public keys you can use to verify software, etc actually came from me.
19
star
10

csgoLyrics

Generates a cfg script based on a lyrics file that allows the player to display the lyrics of any song line by line, using only one key bind.
C++
13
star
11

Gmic-Animation-Tools

Tools for creating animations using other normally static image effect tools
C#
13
star
12

BasicStabilityAPI-GUI

A basic GUI for interacting with the Stability AI API for Stable Diffusion 3
C#
12
star
13

D-Opus-Scripts

Scripts for use with Directory Opus
JavaScript
9
star
14

Analyze-Evergreen-YT-Videos-Macro

Determines the current monthly performance of videos of different age ranges.
VBA
8
star
15

Hue-Bulb-Replacer

Python script for easily replacing an old Philips Hue bulb with a new one, and copying Group and Scene data
Python
7
star
16

Basic-Stability-API-Scripts

Basic scripts for interacting with the Stability AI Stable Diffusion API.
Python
3
star
17

FastSigCheck

Simple lightweight tool that uses the WinVerifyTrust Windows API function to check embedded file signatures with as little overhead as possible.
C++
2
star