Spaces:
Paused
Paused
Update README.md
Browse files
README.md
CHANGED
|
@@ -1,12 +1,41 @@
|
|
| 1 |
---
|
| 2 |
-
title:
|
| 3 |
-
emoji:
|
| 4 |
-
colorFrom:
|
| 5 |
-
colorTo:
|
| 6 |
sdk: gradio
|
| 7 |
-
sdk_version: 6.10.0
|
| 8 |
app_file: app.py
|
| 9 |
pinned: false
|
|
|
|
| 10 |
---
|
| 11 |
|
| 12 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
+
title: SQLCoder Studio
|
| 3 |
+
emoji: ⚡
|
| 4 |
+
colorFrom: blue
|
| 5 |
+
colorTo: purple
|
| 6 |
sdk: gradio
|
|
|
|
| 7 |
app_file: app.py
|
| 8 |
pinned: false
|
| 9 |
+
license: mit
|
| 10 |
---
|
| 11 |
|
| 12 |
+
# ⚡ SQLCoder Studio
|
| 13 |
+
|
| 14 |
+
A **Natural Language → SQL → Results** interface powered by [`defog/sqlcoder-7b-2`](https://huggingface.co/defog/sqlcoder-7b-2).
|
| 15 |
+
|
| 16 |
+
## What it does
|
| 17 |
+
|
| 18 |
+
1. You type a plain-English question about the database
|
| 19 |
+
2. SQLCoder-7B-2 generates the SQL query
|
| 20 |
+
3. The query executes against a local SQLite database
|
| 21 |
+
4. Results are shown as a table (with CSV download)
|
| 22 |
+
|
| 23 |
+
## Sample Database
|
| 24 |
+
|
| 25 |
+
| Table | Description |
|
| 26 |
+
|---|---|
|
| 27 |
+
| `employees` | 12 employees with name, dept, salary, hire date |
|
| 28 |
+
| `departments` | 5 departments with budget & location |
|
| 29 |
+
| `projects` | 6 projects with status & budget |
|
| 30 |
+
| `sales` | 10 sales records with product, amount, region |
|
| 31 |
+
|
| 32 |
+
## Example Questions
|
| 33 |
+
|
| 34 |
+
- *"Show me all employees in Engineering with salary above 120000"*
|
| 35 |
+
- *"Which department has the highest total salary budget?"*
|
| 36 |
+
- *"Who are the top 3 sales performers by total amount?"*
|
| 37 |
+
- *"List all active projects with their budgets"*
|
| 38 |
+
|
| 39 |
+
## Hardware
|
| 40 |
+
|
| 41 |
+
Runs best on **GPU (T4/A10G)**. CPU inference is possible but slow (~1–2 min per query).
|