Agents-MCP-Hackathon/llm-can-tell-funny-jokes
Llm Can Tell Funny Jokes ๐
Welcome to Llm Can Tell Funny Jokes! This project leverages the power of Large Language Models (LLMs) along with Gradio to deliver a fun experience where you can get random dad jokes. The application is built using Python and uses the icanhazdadjoke API to fetch humorous jokes in real-time.
Table of Contents
Overview
Llm Can Tell Funny Jokes is designed to harness the capabilities of LLMs and Gradio to create an interactive web interface that delivers random dad jokes on demand. It is an ideal lightweight application for those who love humor and are interested in experimenting with LLM-based projects.
The key components of this project include:
- Gradio SDK (v5.32.1): For building a user-friendly web interface.
- Requests Library: To fetch jokes from an external API.
- icanhazdadjoke API: Provides a variety of dad jokes in a simple JSON format.
Features
- Real-time Joke Fetching: Interacts with the
icanhazdadjokeAPI to retrieve fresh jokes. - Easy-to-Use Interface: Built with Gradio for quick deployment and a clean user experience.
- Customizable Deployment: Configurable via metadata to personalize your app settings.
- Interactive Experience: Perfect for LLM experimentation and web demo purposes.
Prerequisites
Before getting started, ensure you have the following installed on your system:
- Python 3.7 or higher
- pip (Python package installer)
- Necessary Python libraries:
requestsgradio
You can install the required Python packages using pip:
pip install requests gradioUsage
To launch the application locally, simply run:
python app.pyThis command starts the Gradio interface, and you'll be provided with a URL where you can interact with the app. When you access the URL, you will see a button to fetch a random dad joke.
The application makes a GET request to the icanhazdadjoke API. If the API returns a status code of 200, the joke is displayed. Otherwise, an appropriate error message is shown.
License
This project is open-sourced under the MIT License.
Acknowledgements
- Special thanks to the developers behind the icanhazdadjoke API for providing a fun source of humor!
- Kudos to the Gradio team for creating an amazing tool for deploying interactive machine learning demos.
- Inspired by the creativity of LLM enthusiasts around the globe.
Happy coding and enjoy the jokes!
