Skip to content

This repository contains code files written in Python to build web apps for converting natural language to SQL query using LLM calls. The application is deployed in the form of a simple website built using HTML, CSS and JavaScript for frontend and uses Python-Flask at backend.

License

Notifications You must be signed in to change notification settings

riddhi-283/Natural_language_to_SQL

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Natural_language_to_SQL

This repository contains a code file written in Python to build a web application for converting natural language query to a SQL query using LLM calls. The sql query will then be performed on the database and th query results will be displayed on screen in tabular format for better clarity and understanding. Additionally, there is a "Download results as csv" button which will allow the users to download the obtained query results in form of a csv. The application is deployed in the form of a simple website built using HTML, CSS and JavaScript for frontend and uses Python-Flask at backend. The LLM used is google-gemini-pro model.


Screenshots

Screenshot 2024-07-10 163730 Screenshot 2024-07-10 163755


Installation

To run this project in your laptop:

git clone [email protected]:riddhi-283/Natural_language_to_SQL.git

Setting-up the application

Creating Database

Open Mysql Workbench in your local machines and create a database "atliq_tshirts" using the sql code file provided. Make sure that the MySQL server is running on your laptop while running this application.

Setting up LLM model

Get your free google-api key from "makersuite.google.com"
Create a .env file and paste your google api key.

GOOGLE_API_KEY=''

Running the application

pip install -r requirements.txt
python app.py

About

This repository contains code files written in Python to build web apps for converting natural language to SQL query using LLM calls. The application is deployed in the form of a simple website built using HTML, CSS and JavaScript for frontend and uses Python-Flask at backend.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published