Minor Fix in the example docs (#383)

This commit is contained in:
Touseef Ahmad 2025-01-28 12:55:39 +05:00 committed by GitHub
parent 525a76b836
commit 68f3da12ea
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 13 additions and 2 deletions

View File

@ -35,7 +35,7 @@ Let's build this system. 🛠️
Run the line below to install required dependencies:
```bash
!pip install smolagents pandas langchain langchain-community sentence-transformers datasets rank_bm25 --upgrade -q
!pip install smolagents pandas langchain langchain-community sentence-transformers datasets python-dotenv rank_bm25 --upgrade -q
```
To call the HF Inference API, you will need a valid token as your environment variable `HF_TOKEN`.
We use python-dotenv to load it.

View File

@ -27,7 +27,18 @@ A standard text-to-sql pipeline is brittle, since the generated SQL query can be
Lets build this agent! 💪
First, we setup the SQL environment:
Run the line below to install required dependencies:
```bash
!pip install smolagents python-dotenv sqlalchemy --upgrade -q
```
To call the HF Inference API, you will need a valid token as your environment variable `HF_TOKEN`.
We use python-dotenv to load it.
```py
from dotenv import load_dotenv
load_dotenv()
```
Then, we setup the SQL environment:
```py
from sqlalchemy import (
create_engine,