Dokyoon

leeloolee

AI & ML interests

ai

Recent Activity

liked a model 3 days ago
unsloth/DeepSeek-R1-BF16
reacted to abidlabs's post with 🔥 7 days ago
Hi folks! Excited to share a new feature from the Gradio team along with a tutorial. If you don't already know, Gradio is an open-source Python library used to build interfaces for machine learning models. Beyond just creating UIs, Gradio also exposes API capabilities and now, Gradio apps can be launched Model Context Protocol (MCP) servers for LLMs. If you already know how to use Gradio, there are only two additional things you need to do: * Add standard docstrings to your function (these will be used to generate the descriptions for your tools for the LLM) * Set `mcp_server=True` in `launch()` Here's a complete example (make sure you already have the latest version of Gradio installed): ```py import gradio as gr def letter_counter(word, letter): """Count the occurrences of a specific letter in a word. Args: word: The word or phrase to analyze letter: The letter to count occurrences of Returns: The 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", title="Letter Counter", description="Count how many times a letter appears in a word" ) demo.launch(mcp_server=True) ``` This is a very simple example, but you can add the ability to generate Ghibli images or speak emotions to any LLM that supports MCP. Once you have an MCP running locally, you can copy-paste the same app to host it on [Hugging Face Spaces](https://huggingface.co/spaces/) as well. All free and open-source of course! Full tutorial: https://www.gradio.app/guides/building-mcp-server-with-gradio
View all activity

Organizations

sionic-ai's profile picture Multi🤖Transformers's profile picture 인스트럭트.한국's profile picture AI Safeguard's profile picture

leeloolee's activity