The Meme Explainer Bot is a fun and interactive application that uses artificial intelligence to explain memes and their context. This bot leverages natural language processing and image recognition to analyze memes and provide insightful descriptions and background information. Currently trained on templates - {Arthur's fist, Surprised Pikachu, It's free real estate, This is fine dog, Distracted Boyfriend and Flex Tape}
- Image Analysis: Recognizes and classifies meme templates.
- Contextual Explanation: Provides detailed explanations of meme content and its cultural significance.
- User Interaction: Allows users to upload memes and receive explanations in real-time.
- Python: Programming language for building the bot.
- TensorFlow/Keras: For image recognition and deep learning models.
- Flask: For creating the web service.
- OpenAI GPT: For generating explanations and handling natural language tasks.
- Pillow: For image processing.
-
Clone the repository:
git clone https://github.com/koushik2k3/Meme-Explainer-Bot.git cd Meme-Explainer-Bot -
Create a virtual environment (optional but recommended):
conda create --name tf python=3.9 conda activate tf
-
GPU setup (skip if you only use TensorFlow on CPU):
conda install -c conda-forge cudatoolkit=11.2 cudnn=8.1.0
-
Install TensorFlow (Caution: TensorFlow 2.10 was the last release that supported GPU on native Windows. For TensorFlow 2.11 and later, use WSL2 or install TensorFlow-CPU and optionally try TensorFlow-DirectML-Plugin):
pip install "tensorflow<2.11" -
Verify installation:
Verify the CPU setup:
python -c "import tensorflow as tf; print(tf.reduce_sum(tf.random.normal([1000, 1000])))"If a tensor is returned, TensorFlow is installed successfully.
Verify the GPU setup:
python -c "import tensorflow as tf; print(tf.config.list_physical_devices('GPU'))"If a list of GPU devices is returned, TensorFlow is configured correctly for GPU.
-
Install the required packages using the
requirements.txtfile: -
Set up the environment variables (e.g., OpenAI API keys, model paths) in a
.envfile or directly in your environment.
-
Start the Flask application:
python app.py
-
Open your browser and go to
http://localhost:5000to interact with the bot. -
Upload a meme image and get an explanation!
