Spaces:
Runtime error
Runtime error
A newer version of the Gradio SDK is available: 6.10.0
metadata
title: DataBot ERP Assistant
emoji: π€
colorFrom: blue
colorTo: indigo
sdk: gradio
sdk_version: 5.20.0
app_file: app.py
pinned: false
license: mit
DataBot β ERP Database Assistant
DataBot lets you ask natural-language questions about your ERP database. It uses GPT-4o to translate your question into SQL, executes it safely on your MySQL database, and returns a plain-English summary.
Features
- Natural-language β SQL β plain-English answers
- Whitelist-based table access control (
data_access_config.json) - Blocks all write operations (INSERT / UPDATE / DELETE / DROP β¦)
- Masks sensitive columns (passwords, IBAN, salary, PII)
- Schema cached at startup for fast responses
Setup (Hugging Face Spaces)
Set the following Secrets in your Space settings (Settings β Variables and secrets β New secret):
| Secret name | Description |
|---|---|
DB_USER |
MySQL username |
DB_PASSWORD |
MySQL password |
DB_HOST |
MySQL host IP / domain |
DB_NAME |
Database name (default: dev_poly) |
OPENAI_API_KEY |
Your OpenAI API key |
LLM_MODEL |
Model to use (default: gpt-4o) |
Local Development
# 1. Clone the repo and create .env
cp .env.example .env # fill in your credentials
# 2. Install dependencies
pip install -r requirements.txt
# 3. Run locally
python app.py
Then open http://localhost:7860 in your browser.