/Text_to_SQL_Application

This project uses Google Gemini to automatically generate SQL queries from natural language questions. Non-technical users can now directly access databases without writing SQL code, saving time and effort in education, business, and research.

Primary LanguagePythonGNU General Public License v3.0GPL-3.0

Contributors Forks Stargazers Issues LinkedIn


Logo

Text to SQL Generation using Google Gemini

The aim of this project is to take a text question from the user, convert them into a actionable SQL query, and then query a given database based on the text input from the user.

Report Bug · Request Feature

Table of Contents
  1. About The Project
  2. Deployment
  3. Contributing
  4. Contact

About The Project

Product Name Screen Shot

In this project, we have leveraged the capabilities of Google Gemini models and API to generate the output from a SQL Database based on a text question given by the user. The project aims to simplify the process of accessing databases and performing operations on SQL based, without neccessarily knwoing how to write or read SQL commands. Thus, it helps in saving time and effort for multiple stakeholders, as well as allowing non-technical persons to interact with the database. By utilizing advanced natural language processing (NLP) models, the application can extract the exact information needed by the user and formulate a relevant SQL command and execute the same on any given database.

The user can type in their query and hit the database running, allowing this to be a seamless experience. The application can be used in various domains, including education, business, and research, to streamline the process of querying databases and extracting information.

(back to top)

Built With

  • google-gemini
  • sqlite

(back to top)

Deployment

The application is deployed via Hugging face spaces. That can be achieved by following the steps below:

  1. First, create an account on Hugging Face Spaces and log in to the account. The link to the website is here.

  2. Next, create a new space by clicking on the "Create Space" button on the top right corner of the screen. Fill in the details for the space and click on "Create Space".

  3. Push all your code to the Hugging Face repository by running the following command in the terminal:

git clone https://huggingface.co/spaces/"Your Repository Name"
git add .
git commit -m "Initial Commit"
git push -u origin main

The application should now be deployed on the Hugging Face Spaces platform. You can access the application by clicking on the "Open in Spaces" button on the top right corner of the screen. You can also share the link to the application with others by clicking on the "Share" button on the top right corner of the screen.

(back to top)

Contributing

I'm thrilled to have you exploring my project! This endeavor is a collective effort, and we believe that every contribution adds value and creativity to our community.

How You Can Contribute:

🛠️ Found a bug? Have an idea for improvement? Fork the repo and create a pull request.

💡 Have a suggestion for making this project even better? Open an issue with the "enhancement" tag.

⭐ Like what you see? Show your support by giving our project a star!

Remember, your contributions, whether big or small, are incredibly valuable to us. They help us learn, inspire, and create a better project together.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

Thank you for being a part of this journey!

(back to top)

Contact

Dhruv Pamneja - dpamneja@gmail.com / 21f1001719@ds.study.iitm.ac.in

Project Link: https://github.com/d-pamneja/Text_to_SQL_Application

(back to top)