File size: 1,158 Bytes
4109b5c
4284ad5
 
 
 
4109b5c
 
 
4284ad5
4109b5c
 
4284ad5
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
---
title: SQLCoder Studio
emoji: 
colorFrom: blue
colorTo: purple
sdk: gradio
app_file: app.py
pinned: false
license: mit
---

# ⚡ SQLCoder Studio

A **Natural Language → SQL → Results** interface powered by [`defog/sqlcoder-7b-2`](https://huggingface.co/defog/sqlcoder-7b-2).

## What it does

1. You type a plain-English question about the database
2. SQLCoder-7B-2 generates the SQL query
3. The query executes against a local SQLite database
4. Results are shown as a table (with CSV download)

## Sample Database

| Table | Description |
|---|---|
| `employees` | 12 employees with name, dept, salary, hire date |
| `departments` | 5 departments with budget & location |
| `projects` | 6 projects with status & budget |
| `sales` | 10 sales records with product, amount, region |

## Example Questions

- *"Show me all employees in Engineering with salary above 120000"*
- *"Which department has the highest total salary budget?"*
- *"Who are the top 3 sales performers by total amount?"*
- *"List all active projects with their budgets"*

## Hardware

Runs best on **GPU (T4/A10G)**. CPU inference is possible but slow (~1–2 min per query).