From 428aedde93807603dbe75c254afb793c741ec52d Mon Sep 17 00:00:00 2001 From: David Berenstein Date: Wed, 22 Jan 2025 09:28:15 +0100 Subject: [PATCH] Update README and documentation to clarify Hub integrations with Gradio Spaces and fix code snippet formatting (#306) - Changed the description of Hub integrations to specify sharing and loading of Gradio Spaces as tools. - Fixed a formatting issue in the code snippet by removing an extraneous comma in the import statement. --- README.md | 6 +++--- docs/source/en/index.md | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 322ab18..4d434d2 100644 --- a/README.md +++ b/README.md @@ -37,13 +37,13 @@ limitations under the License. 🧑‍💻 **First-class support for Code Agents**, i.e. agents that write their actions in code (as opposed to "agents being used to write code"). To make it secure, we support executing in sandboxed environments via [E2B](https://e2b.dev/). - On top of this [`CodeAgent`](https://huggingface.co/docs/smolagents/reference/agents#smolagents.CodeAgent) class, we still support the standard [`ToolCallingAgent`](https://huggingface.co/docs/smolagents/reference/agents#smolagents.ToolCallingAgent) that writes actions as JSON/text blobs. -🤗 **Hub integrations**: you can share and load tools to/from the Hub, and more is to come! +🤗 **Hub integrations**: you can share and load Gradio Spaces as tools to/from the Hub, and more is to come! 🌐 **Support for any LLM**: it supports models hosted on the Hub loaded in their `transformers` version or through our inference API, but also supports models from OpenAI, Anthropic and many others via our [LiteLLM](https://www.litellm.ai/) integration. Full documentation can be found [here](https://huggingface.co/docs/smolagents/index). -> [!NOTE] +> [!NOTE] > Check the our [launch blog post](https://huggingface.co/blog/smolagents) to learn more about `smolagents`! ## Quick demo @@ -54,7 +54,7 @@ pip install smolagents ``` Then define your agent, give it the tools it needs and run it! ```py -from smolagents import CodeAgent, DuckDuckGoSearchTool, HfApiModel +from smolagents import CodeAgent, DuckDuckGoSearchTool, HfApiModel, agent = CodeAgent(tools=[DuckDuckGoSearchTool()], model=HfApiModel()) diff --git a/docs/source/en/index.md b/docs/source/en/index.md index 170c022..90f5c78 100644 --- a/docs/source/en/index.md +++ b/docs/source/en/index.md @@ -29,7 +29,7 @@ This library offers: 🧑‍💻 **First-class support for Code Agents**, i.e. agents that write their actions in code (as opposed to "agents being used to write code"), [read more here](tutorials/secure_code_execution). -🤗 **Hub integrations**: you can share and load tools to/from the Hub, and more is to come! +🤗 **Hub integrations**: you can share and load Gradio Spaces as tools to/from the Hub, and more is to come!