Skip to content

Commit 958133c

Browse files
authored
Update gradio-client.mdx
There is a continuous weird referencing mentioning that we have built this MCP server in a previous section, which didn't happen, the MCP server built in the previous section is a simple sentiment analysis, so I removed this reference, to make things less confusing.
1 parent 64a7231 commit 958133c

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

units/en/unit2/gradio-client.mdx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@ Gradio is best suited to the creation of UI clients and MCP servers, but it is a
88

99
</Tip>
1010

11-
We'll connect to the MCP server we created in the previous section and use it to answer questions.
11+
We'll connect to an MCP server similar to the one we created in the previous section but with additional features, and use it to answer questions.
1212

1313
## MCP Client in Gradio
1414

1515
### Connect to an example MCP Server
1616

17-
Let's connect to an example MCP Server that is already running on Hugging Face. We'll use [this one](https://huggingface.co/spaces/abidlabs/mcp-tools2) for this example. It's a space that contains a collection of MCP tools.
17+
Let's connect to an example MCP Server that is already running on Hugging Face. We'll use [this one](https://huggingface.co/spaces/abidlabs/mcp-tool-http) for this example. It's a space that contains a collection of MCP tools.
1818

1919
```python
2020
from smolagents.mcp_client import MCPClient
@@ -39,9 +39,9 @@ sepia: Apply a sepia filter to the input image.
3939
</pre>
4040
</details>
4141

42-
### Connect to your MCP Server from Gradio
42+
### Connect to the MCP Server from Gradio
4343

44-
Great, now that you've connected to an example MCP Server, let's connect to your own MCP Server from Gradio.
44+
Great, now that you've connected to an example MCP Server. Now, you need to use it in an example application.
4545

4646
First, we need to install the `smolagents`, Gradio and mcp-client libraries, if we haven't already:
4747

@@ -64,7 +64,7 @@ Next, we'll connect to the MCP Server and get the tools that we can use to answe
6464

6565
```python
6666
mcp_client = MCPClient(
67-
{"url": "https://abidlabs-mcp-tool-http.hf.space/gradio_api/mcp/sse"} # This is the MCP Server we created in the previous section
67+
{"url": "https://abidlabs-mcp-tool-http.hf.space/gradio_api/mcp/sse"} # This is the MCP Client we created in the previous section
6868
)
6969
tools = mcp_client.get_tools()
7070
```
@@ -104,7 +104,7 @@ And that's it! We've created a simple Gradio interface that uses the MCP Client
104104

105105
## Complete Example
106106

107-
Here's the complete example of the MCP Client in Gradio:
107+
Here's the complete example of the usage of an MCP Client in Gradio:
108108

109109
```python
110110
import gradio as gr
@@ -116,7 +116,7 @@ from smolagents import InferenceClientModel, CodeAgent, ToolCollection, MCPClien
116116

117117
try:
118118
mcp_client = MCPClient(
119-
{"url": "https://abidlabs-mcp-tool-http.hf.space/gradio_api/mcp/sse"} # This is the MCP Server we created in the previous section
119+
{"url": "https://abidlabs-mcp-tool-http.hf.space/gradio_api/mcp/sse"}
120120
)
121121
tools = mcp_client.get_tools()
122122

@@ -153,7 +153,7 @@ To deploy your Gradio MCP client to Hugging Face Spaces:
153153

154154
```python
155155
mcp_client = MCPClient(
156-
{"url": "https://abidlabs-mcp-tool-http.hf.space/gradio_api/mcp/sse"} # This is the MCP Server we created in the previous section
156+
{"url": "https://abidlabs-mcp-tool-http.hf.space/gradio_api/mcp/sse"}
157157
)
158158
```
159159

0 commit comments

Comments
 (0)