Skip to content

Commit e5d5b8f

Browse files
authored
Merge pull request #30 from karenwky/unit-1-unit-2-update
Unit 1 & Unit 2 update
2 parents 2f37bbf + 96a99d8 commit e5d5b8f

File tree

5 files changed

+6
-10
lines changed

5 files changed

+6
-10
lines changed

units/en/unit1/gradio-mcp.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Gradio MCP Integration
22

3-
We've now explored the core concepts of the MCP protocol and how to implement an MCP Servers and Clients. In this section, we're going to make things slightly easier by using Gradio to create an MCP Server!
3+
We've now explored the core concepts of the MCP protocol and how to implement MCP Servers and Clients. In this section, we're going to make things slightly easier by using Gradio to create an MCP Server!
44

55
<Tip>
66

@@ -151,4 +151,4 @@ Gradio's integration with MCP provides an accessible entry point to the MCP ecos
151151

152152
As we progress through this course, we'll explore more sophisticated MCP implementations, but Gradio offers an excellent starting point for understanding and experimenting with the protocol.
153153

154-
In the next unit, we'll dive deeper into building MCP applications, focusing on setting up development environments, exploring SDKs, and implementing more advanced MCP Servers and Clients.
154+
In the next unit, we'll dive deeper into building MCP applications, focusing on setting up development environments, exploring SDKs, and implementing more advanced MCP Servers and Clients.

units/en/unit1/mcp-clients.mdx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -277,9 +277,8 @@ sepia: Apply a sepia filter to the input image.
277277
Now, let's see how we can use the MCP Client in a code agent.
278278

279279
```python
280-
from smolagents import ToolCollection, CodeAgent
280+
from smolagents import InferenceClientModel, CodeAgent, ToolCollection
281281
from mcp.client.stdio import StdioServerParameters
282-
from smolagents import CodeAgent, InferenceClientModel
283282

284283
model = InferenceClientModel()
285284

units/en/unit2/gradio-client.mdx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,7 @@ Now, we can import the necessary libraries and create a simple Gradio interface
2525
import gradio as gr
2626

2727
from mcp.client.stdio import StdioServerParameters
28-
from smolagents import ToolCollection, CodeAgent
29-
from smolagents import CodeAgent, InferenceClientModel
28+
from smolagents import InferenceClientModel, CodeAgent, ToolCollection
3029
from smolagents.mcp_client import MCPClient
3130
```
3231

@@ -79,8 +78,7 @@ Here's the complete example of the MCP Client in Gradio:
7978
import gradio as gr
8079

8180
from mcp.client.stdio import StdioServerParameters
82-
from smolagents import ToolCollection, CodeAgent
83-
from smolagents import CodeAgent, InferenceClientModel
81+
from smolagents import InferenceClientModel, CodeAgent, ToolCollection
8482
from smolagents.mcp_client import MCPClient
8583

8684

units/en/unit2/gradio-server.mdx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,6 @@ textblob
167167

168168
3. Push your code to the Space:
169169
```bash
170-
cp server.py app.py
171170
git init
172171
git add app.py requirements.txt
173172
git commit -m "Initial commit"

units/en/unit2/tiny-agents.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Tiny Agents: an MCP-powered agent in 50 lines of code
22

3-
Now that we've built MCP servers in Gradio let's explore MCP clients even further. This section builds on the experimental project [Tiny Agents](https://huggingface.co/blog/tiny-agents), which demonstrates a super simple way of deploying MCP clients that can connect to services like our Gradio sentiment analysis server.
3+
Now that we've built MCP servers in Gradio, let's explore MCP clients even further. This section builds on the experimental project [Tiny Agents](https://huggingface.co/blog/tiny-agents), which demonstrates a super simple way of deploying MCP clients that can connect to services like our Gradio sentiment analysis server.
44

55
In this short exercise, we will walk you through how to implement a TypeScript (JS) MCP client that can communicate with any MCP server, including the Gradio-based sentiment analysis server we built in the previous section. You'll see how MCP standardizes the way agents interact with tools, making Agentic AI development significantly simpler.
66

0 commit comments

Comments
 (0)