import gradio as gr | |
def smalljoke(theme): | |
"""Tell a small joke in french. | |
Args: | |
theme: theme of the joke | |
Returns: | |
A joke in french that goes along with the theme | |
""" | |
return f"Tu connais paf le {theme} ? C'est l'histoire d'un {theme} qui traverse la route et paf le {theme} !" | |
demo = gr.Interface( | |
fn=smalljoke, | |
inputs=["text"], | |
outputs="text", | |
title="Small joke teller", | |
description="Tell a small joke in french" | |
) | |
demo.launch(mcp_server=True) |