Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

akhila2308/IntelliSQL

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

15 Commits

Repository files navigation

🧠 IntelliSQL

Intelligent SQL Querying with LLMs Using Gemini 2.5 Flash


πŸš€ AI-powered web application that converts natural language queries into executable SQL using Google Gemini.


πŸ“Œ Project Overview

IntelliSQL is an AI-driven system that enables users to interact with relational databases using plain English instead of SQL syntax.

The application uses Google Gemini 2.5 Flash to translate natural language into structured SQL queries, executes them on a SQLite database, and displays the results in a Streamlit web interface.

πŸš€ Features

  • πŸ—£ Natural Language to SQL Conversion
  • πŸ€– Google Gemini 2.5 Flash Integration
  • πŸ—„ SQLite Database Execution
  • πŸ“Š Structured Result Display using Pandas
  • πŸ–₯ Multi-Page Streamlit Interface
  • πŸ” Secure API Key Handling using .env
  • πŸ›‘ SELECT Query Restriction for Safety
  • πŸ“¦ Docker Deployment Ready

πŸ— System Architecture

User (Browser) ↓ Streamlit UI ↓ get_response() ↓ Gemini 2.5 Flash LLM ↓ Generated SQL ↓ read_query() ↓ SQLite Database ↓ Results Displayed in UI

πŸ›  Technology Stack

  • Programming Language: Python
  • Web Framework: Streamlit
  • LLM: Google Gemini 2.5 Flash
  • Database: SQLite
  • Data Handling: Pandas
  • Containerization: Docker
  • Version Control: Git & GitHub

πŸ“‚ Project Structure

IntelliSQL/ β”‚ β”œβ”€β”€ app.py β”œβ”€β”€ database.py β”œβ”€β”€ llm_engine.py β”œβ”€β”€ prompt_config.py β”œβ”€β”€ requirements.txt β”œβ”€β”€ Dockerfile β”œβ”€β”€ README.md β”œβ”€β”€ assets/

πŸ—„ Database Schema

CREATE TABLE STUDENTS(
 NAME TEXT,
 CLASS TEXT,
 MARKS INTEGER,
 COMPANY TEXT
);

πŸ“Έ Application Screenshots

🏠 Home Page

Home Page

πŸ€– Query Interface

Query Page

πŸ“Š Results Display

Result Page


βš™ Installation Guide

1️⃣ Clone Repository

git clone https://github.com/akhila2308/IntelliSQL.git
cd IntelliSQL

2️⃣ Create Virtual Environment python -m venv venv venv\Scripts\activate

3️⃣ Install Dependencies pip install -r requirements.txt

4️⃣ Setup API Key API_KEY=A***************

β–Ά Run Application streamlit run app.py

Access in browser: http://localhost:8501

About

AI-powered natural language to SQL query system using Google Gemini 2.5 Flash and Streamlit.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

Contributors

Languages

AltStyle γ«γ‚ˆγ£γ¦ε€‰ζ›γ•γ‚ŒγŸγƒšγƒΌγ‚Έ (->γ‚ͺγƒͺγ‚ΈγƒŠγƒ«) /