Spaces:
Sleeping
Sleeping
import gradio as gr | |
def letter_counter(word, letter): | |
word = word.lower() | |
letter = letter.lower() | |
return word.count(letter) | |
demo = gr.Interface( | |
fn=letter_counter, | |
inputs=["textbox", "textbox"], | |
outputs="number", | |
title="Letter Counter", | |
description="Enter text and a letter to count how many times the letter appears in the text." | |
) | |
if __name__ == "__main__": | |
demo.launch(mcp_server=True) # This is the key part to enable MCP | |