import gradio as gr def letter_counter(word: str, letter: str) -> int: """Count occurrences of a letter in a word. Args: word: The word to search in letter: The letter to count Returns: Number of times the letter appears in the word """ return word.lower().count(letter.lower()) demo = gr.Interface(fn=letter_counter, inputs=["text", "text"], outputs="number", placeholder="Result will be displayed here..."), title="Sentiment Analysis", description="This app analyzes the sentiment of the input text using TextBlob and returns the polarity, subjectivity, and assessment.", theme="default") demo.launch(mcp_server=True) # exposes an MCP schema automatically