Spaces:
Paused
Paused
ggsmith842
commited on
Commit
·
1465f70
1
Parent(s):
9978fe9
update
Browse files- app.py +5 -8
- requirements.txt +2 -68
app.py
CHANGED
@@ -1,11 +1,7 @@
|
|
1 |
import os
|
2 |
import gradio as gr
|
3 |
|
4 |
-
from
|
5 |
-
from smolagents import InferenceClientModel, CodeAgent, ToolCollection, MCPClient
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
|
10 |
token = os.getenv("HF_TOKEN")
|
11 |
if token:
|
@@ -13,10 +9,11 @@ if token:
|
|
13 |
|
14 |
try:
|
15 |
mcp_client = MCPClient(
|
16 |
-
|
17 |
-
|
18 |
-
{"url": "https://ggsmith-mcp-sentiment.hf.space/gradio_api/mcp/sse"}
|
19 |
)
|
|
|
20 |
tools = mcp_client.get_tools()
|
21 |
|
22 |
model = InferenceClientModel(token=os.getenv("HF_TOKEN"))
|
|
|
1 |
import os
|
2 |
import gradio as gr
|
3 |
|
4 |
+
from smolagents import InferenceClientModel, CodeAgent, MCPClient
|
|
|
|
|
|
|
|
|
5 |
|
6 |
token = os.getenv("HF_TOKEN")
|
7 |
if token:
|
|
|
9 |
|
10 |
try:
|
11 |
mcp_client = MCPClient(
|
12 |
+
# mcp server created in previous section
|
13 |
+
{"url": "http://localhost:7860/gradio_api/mcp/sse"}
|
14 |
+
# {"url": "https://ggsmith-mcp-sentiment.hf.space/gradio_api/mcp/sse"}
|
15 |
)
|
16 |
+
|
17 |
tools = mcp_client.get_tools()
|
18 |
|
19 |
model = InferenceClientModel(token=os.getenv("HF_TOKEN"))
|
requirements.txt
CHANGED
@@ -1,68 +1,2 @@
|
|
1 |
-
|
2 |
-
|
3 |
-
anyio==4.9.0
|
4 |
-
audioop-lts==0.2.1 ; python_full_version >= '3.13'
|
5 |
-
certifi==2025.4.26
|
6 |
-
charset-normalizer==3.4.2
|
7 |
-
click==8.1.8
|
8 |
-
colorama==0.4.6 ; platform_system == 'Windows'
|
9 |
-
fastapi==0.115.12
|
10 |
-
ffmpy==0.5.0
|
11 |
-
filelock==3.18.0
|
12 |
-
fsspec==2025.3.2
|
13 |
-
gradio==5.29.0
|
14 |
-
gradio-client==1.10.0
|
15 |
-
groovy==0.1.2
|
16 |
-
h11==0.16.0
|
17 |
-
hf-xet==1.1.0 ; platform_machine == 'aarch64' or platform_machine == 'amd64' or platform_machine == 'arm64' or platform_machine == 'x86_64'
|
18 |
-
httpcore==1.0.9
|
19 |
-
httpx==0.28.1
|
20 |
-
httpx-sse==0.4.0
|
21 |
-
huggingface-hub==0.31.1
|
22 |
-
idna==3.10
|
23 |
-
jinja2==3.1.6
|
24 |
-
joblib==1.5.0
|
25 |
-
jsonref==1.1.0
|
26 |
-
markdown-it-py==3.0.0
|
27 |
-
markupsafe==3.0.2
|
28 |
-
mcp==1.7.1
|
29 |
-
mcpadapt==0.1.4
|
30 |
-
mdurl==0.1.2
|
31 |
-
nltk==3.9.1
|
32 |
-
numpy==2.2.5
|
33 |
-
orjson==3.10.18
|
34 |
-
packaging==25.0
|
35 |
-
pandas==2.2.3
|
36 |
-
pillow==11.2.1
|
37 |
-
pydantic==2.11.4
|
38 |
-
pydantic-core==2.33.2
|
39 |
-
pydantic-settings==2.9.1
|
40 |
-
pydub==0.25.1
|
41 |
-
pygments==2.19.1
|
42 |
-
python-dateutil==2.9.0.post0
|
43 |
-
python-dotenv==1.1.0
|
44 |
-
python-multipart==0.0.20
|
45 |
-
pytz==2025.2
|
46 |
-
pyyaml==6.0.2
|
47 |
-
regex==2024.11.6
|
48 |
-
requests==2.32.3
|
49 |
-
rich==14.0.0
|
50 |
-
ruff==0.11.8 ; sys_platform != 'emscripten'
|
51 |
-
safehttpx==0.1.6
|
52 |
-
semantic-version==2.10.0
|
53 |
-
shellingham==1.5.4
|
54 |
-
six==1.17.0
|
55 |
-
smolagents==1.15.0
|
56 |
-
sniffio==1.3.1
|
57 |
-
sse-starlette==2.3.4
|
58 |
-
starlette==0.46.2
|
59 |
-
textblob==0.19.0
|
60 |
-
tomlkit==0.13.2
|
61 |
-
tqdm==4.67.1
|
62 |
-
typer==0.15.3
|
63 |
-
typing-extensions==4.13.2
|
64 |
-
typing-inspection==0.4.0
|
65 |
-
tzdata==2025.2
|
66 |
-
urllib3==2.4.0
|
67 |
-
uvicorn==0.34.2
|
68 |
-
websockets==15.0.1
|
|
|
1 |
+
gradio[mcp]
|
2 |
+
smolagents[mcp]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|