Streamlit Examples
- Use
pytidb
to connect to TiDB - Use Streamlit as web ui
Prerequisites
- Python 3.8+
- OpenAI API key
- TiDB server connection string, either local or TiDB Cloud
How to run
Step0: Clone the repo
Step1: Install the required packages
Step2: Run the Streamlit app
Step3: Open the browser and visit http://localhost:8501
- Input OpenAI API key in left sidebar
- Input the TiDB Cloud connection string in left sidebar, the format is
mysql+pymysql://root@localhost:4000/test
Related Resources
- Source Code: View on GitHub
-
Category: Ai-Apps
-
Description: Convert natural language queries into SQL statements using AI models.