Spaces:
Sleeping
Sleeping
File size: 466 Bytes
27bcbe4 fc8aba8 27bcbe4 fc8aba8 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
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
|