Learn how to build a text-to-sql application using Vanna.AI and Streamlit
Follow the instructions in the Vanna.AI website to create an account. Once you are logged in, you will need to do the following:
- Get an API key (click on
API Keys
on the left side of the page) - Create a new RAG model (click on
RAG Models
on the left side of the page and choose a unique name for your model and click on theCreate Model
button)
virtualenv venv
source venv/bin/activate
pip install -r requirements.txt
Follow the instructions in train.py
to pass the variables required to run the code. You will need to ensure that your database is running. You can set up a test database to try this out. Here is a Github repo you can use to set one up.
python train.py
python -m streamlit run sql_app.py