From c95357adcabe7ff6c816d9dd24112236092891c7 Mon Sep 17 00:00:00 2001 From: sergiopaniego Date: Fri, 15 Nov 2024 11:23:02 +0100 Subject: [PATCH 1/2] Added HF login cell to recipe --- notebooks/en/agents.ipynb | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/notebooks/en/agents.ipynb b/notebooks/en/agents.ipynb index a0533852..ed9d6d79 100644 --- a/notebooks/en/agents.ipynb +++ b/notebooks/en/agents.ipynb @@ -29,13 +29,31 @@ "!pip install \"transformers[agents]\" datasets langchain sentence-transformers faiss-cpu duckduckgo-search openai langchain-community --upgrade -q" ] }, + { + "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", From 838497e37c76b928fd86619763fa47236aba3838 Mon Sep 17 00:00:00 2001 From: sergiopaniego Date: Fri, 15 Nov 2024 19:22:53 +0100 Subject: [PATCH 2/2] Updated notebook according to feedback :) --- notebooks/en/agents.ipynb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/notebooks/en/agents.ipynb b/notebooks/en/agents.ipynb index ed9d6d79..236da622 100644 --- a/notebooks/en/agents.ipynb +++ b/notebooks/en/agents.ipynb @@ -33,7 +33,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "Let's log in to be able to call the HF Inference API:" + "Let's login in order to call the HF Inference API:" ] }, {