CoolFace
Apppublic

Agents-MCP-Hackathon/llm-can-tell-funny-jokes

sourceHugging Facemitupdated 1y agoView on Hugging Face
0likes
App README

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 icanhazdadjoke API 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:
  • โ€”requests
  • โ€”gradio

You can install the required Python packages using pip:

bash
pip install requests gradio

Usage

To launch the application locally, simply run:

bash
python app.py

This 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!