This is a simple joke generation application using Tkinter, OpenAI GPT, and DALL·E to generate funny dad jokes and create images based on the jokes.
- Dad Jokes Generator: Enter a topic, and the app generates a dad joke using OpenAI GPT.
- Image Generation: The app also generates an illustration of the dad joke using the DALL·E API.
- Simple UI: The app has a clean user interface built with Tkinter.
- Clear Button: You can clear the input and reset the display with a single click.
- Clone the repository:
cd dadjoke3000
- Install the required dependencies:
pip install -r requirements.txt
- Ensure you have a placeholder image in the root directory named
placeholder_image.png
(or update the code with your image path). - Replace the OpenAI API key in the code:
client = OpenAI(api_key='your-api-key')
- Run the app:
python app.py
- Tkinter: Provides the GUI framework.
- OpenAI: Communicates with GPT and DALL·E for generating jokes and images.
- Pillow: Handles image processing and display.
- Requests: Fetches the generated image from DALL·E's API.
- Enter a joke subject (e.g., "bananas").
- Click "Get my dad joke!" to generate a joke and an image.
- Use the "Clear" button to reset the input and display.
This project is licensed under the MIT License. See the LICENSE file for details.