You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+81-73Lines changed: 81 additions & 73 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,76 +1,68 @@
1
+
# Text-to-SQL Platform (FastAPI + Groq)
1
2
2
-
# SQL Query Generator with Google Gemini
3
+
This repository provides a modular backend that converts natural language into SQL and executes it on an SQLite database (`student.db`).
3
4
4
-
This project is a Streamlit application that converts English questions into SQL queries using Google Gemini's generative AI capabilities. It allows users to retrieve data from an SQLite database named **STUDENT**, which contains information about students, their classes, sections, and marks.
5
+
The backend is built with FastAPI and uses Groq’s OpenAI-compatible API to generate SQL from English questions. A separate modern UI will be added by the frontend team.
5
6
6
7
## Table of Contents
7
8
8
9
-[Features](#features)
9
10
-[Technologies Used](#technologies-used)
10
-
-[Installation](#installation)
11
-
-[Usage](#usage)
11
+
-[Getting Started](#getting-started)
12
12
-[Example Queries](#example-queries)
13
13
-[Database Schema](#database-schema)
14
+
-[API Endpoints (v1)](#api-endpoints-v1)
15
+
-[Testing & Coverage](#testing--coverage)
16
+
-[Roadmap](#roadmap)
14
17
-[Contributing](#contributing)
15
18
-[License](#license)
19
+
-[License](#license)
16
20
17
21
## Features
18
22
19
-
- Convert natural language questions into SQL queries.
20
-
- Execute generated SQL queries against an SQLite database.
21
-
- User-friendly interface built with Streamlit.
23
+
- Convert natural language questions into SQL queries (Groq).
24
+
- Execute generated SQL queries against the SQLite database.
3. Input your question in the text box and click the "Ask the question" button. The app will generate an SQL query based on your input and execute it against the database, displaying the results.
65
+
Open API docs at: http://127.0.0.1:8000/docs
74
66
75
67
## Example Queries
76
68
@@ -82,14 +74,49 @@ Here are some example questions you can ask:
82
74
83
75
## Database Schema
84
76
85
-
The database **STUDENT** has the following schema:
77
+
The database **student.db** has the following schema:
0 commit comments