CoolFace
Apppublic

Benjamona97/sql-agent

sourceHugging Faceupdated 3y agoView on Hugging Face
0likes
App README

Chinook SQL Agent Demo

Load whatever data dictionary you want into data folder! Right know it's just a simple sqlite database sample.

In modules folder we have two modules, one for most databases and other for sqlite.

The sqlite module is a simple one, it's just a wrapper for sqlite3 python module.

The other module is a more complex one and accepts most SQL databases connections using a DB_URL env variable.

Copy env variables and fill values (if you are just going to use sqlite, you can leave it with only the api key setted)

bash
cp .env.example .env

Create virtual environment

bash
python3 -m venv .venv
source .venv/bin/activate

Install dependencies

bash
pip install -r requirements.txt

Run the app

bash
chainlit run app.py