import ast import gradio as gr from functions import example_question_generator, chatbot_func from data_sources import connect_sql_db from utils import message_dict with gr.Blocks() as demo: with gr.Accordion("ℹ️ About the SQL Connector", open=False): gr.HTML("""
Connect to a PostgreSQL database and query it using natural language.
No credentials are retained — they are passed as session variables and disappear when you leave or refresh.
Queries run through Pandas read_sql_query, which cannot delete, drop, or insert rows.
Use caution connecting production databases to third-party tools.
Contact me if you'd like this built for your organization with proper infrastructure and security controls.
Demo credentials pre-filled. Replace with your own database details to analyze your own data.