mcp-sentiment / app.py
donbosco
Deployment angepasst
7aba55c
raw
history blame contribute delete
811 Bytes
import random
import gradio as gr
def greet(name: str) -> str:
"""
Greet a user if he introduces himself with his name. Otherwise ignore.
Args:
name (str): A name which needs to be used to greet
Returns:
str: A string containing a greet which must be returned to the user
"""
return "Hello " + name + "!! Oh du wundervoller Mensch."
def say_random_number(until: int = 100) -> int:
"""
generates a random number
Args:
until (int): Defines the range of the random number
Returns:
int: A random number.
"""
zufallszahl = random.randint(1, until) # Gibt eine zufällige Zahl zwischen 1 und 100 (inklusive) zurück
return zufallszahl
demo = gr.Interface(fn=greet, inputs="text", outputs="text")
demo.launch(mcp_server=True)