This repository contains the project for AI based SQL query generator based on natural language based input of user. This repository was originally developed for our submissions at CSI HackNUthon, Nirma University
This is a minimalistic web application built with Streamlit that allows users to generate SQL queries based on their inputs locally using LM studio.
Libraries: openai, pathlib, streamlit, streamlit_lottie
Others: LM studio, VS code, SQL Lite, Browser(for user interaction)
- Input your ddl, such as table names, columns, conditions, etc.
- Input Natural language query from user to retrieve data.
- Click on the "Generate Query" button to generate the SQL query based on your inputs.
- Copy the generated SQL query and use it in your database operations.
- To avoid step 4, we tried to implement the 'sql.py' file so that the extracted query can directly can be used on input database.
- We also tried to implement a chatbot like structure for making a full fledged AI-SQL chatbot in 'text.py'.
Contributions are welcome for this project.