This Streamlit app enables users to upload CSV or Excel files and perform automated SQL-based data analysis using Groq's LLM API. The app uses DuckDB to execute SQL queries generated from natural language inputs, making data exploration and analytics seamless for non-technical users.
- 🗂 Upload and manage multiple datasets (CSV, Excel)
- 🧠 Ask questions in plain English — the app generates and executes SQL queries using Groq’s LLM
- 🐥 Lightweight SQL execution engine (DuckDB)
- 🚀 Instant results and table previews
Upload a dataset like sales.csv and ask:
"What is the total revenue grouped by region?"
The app will:
- Convert your question into an SQL query using Groq
- Execute the query using DuckDB
- Show the results in a clean table format
- Python
- Streamlit – for web UI
- DuckDB – in-memory SQL execution engine
- Groq API – LLM-based SQL generation
- dotenv – environment variable management
- pandas – for data manipulation
pip install -r requirements.txtCreate a .env file in the root directory and include:
GROQ_API_KEY=your_actual_api_key_here
streamlit run your_script_name.py.
├── app.py
├── requirements.txt
├── .env
└── README.md- Only
.csvand.xlsxfiles are supported - Make sure to name tables meaningfully when uploading
- The SQL queries are generated based on column names and data types