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.
To run this project in your laptop:
git clone [email protected]:riddhi-283/Natural_language_to_SQL.git
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.
Get your free google-api key from "makersuite.google.com"
Create a .env file and paste your google api key.
GOOGLE_API_KEY=''
pip install -r requirements.txt
python app.py