Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added HF login cell to Build an agent with tool-calling superpowers 🦸 using Transformers Agents recipe #230

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 19 additions & 1 deletion notebooks/en/agents.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,31 @@
"!pip install \"transformers[agents]\" datasets langchain sentence-transformers faiss-cpu duckduckgo-search openai langchain-community --upgrade -q"
Copy link
Member

@stevhliu stevhliu Nov 15, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Let's login in order to call the HF Inference API:"


Reply via ReviewNB

]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Let's log in to be able to call the HF Inference API:"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"from huggingface_hub import notebook_login\n",
"\n",
"notebook_login()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## 1. 🏞️ Multimodal + 🌐 Web-browsing assistant\n",
"\n",
"For this use case, we want to show an agent that browses the web and is able to generate image.\n",
"For this use case, we want to show an agent that browses the web and is able to generate images.\n",
"\n",
"To build it, we simply need to have two tools ready: image generation and web search.\n",
"- For image generation, we load a tool from the Hub that uses the HF Inference API (Serverless) to generate images using Stable Diffusion.\n",
Expand Down
Loading