serJD's picture
ini commit
afd4f00 verified
raw
history blame
834 Bytes
import gradio as gr
def create_greeting_message(user_name: str, tone: str) -> str:
"""
Creates a friendly or hostile user message for a user
Args:
user_name: the name of the user that needs a greeting message
tone: choose between "friendly" and "hostile"
Returns:
A string with the user message
"""
if tone == "friendly":
greeting_msg = "Great to have you here " + user_name
elif tone == "hostile":
greeting_msg = "Ehm, soo cool to have you here " + user_name
else:
greeting_msg = "wrong argument for tone"
return greeting_msg
demo = gr.Interface(
fn=concat_upper,
inputs=[gr.Textbox(label="First Text"), gr.Textbox(label="Second Text")],
outputs=[gr.Textbox(label="Result")],
title="Concat & Uppercase"
)
demo.launch(mcp_server=True)