Skip to content

End-to-end Streamlit application enables seamless conversion of natural language queries into SQL (Structured Query Language) queries, along with querying an SQLite database. Leveraging the Gemini-pro API for language model capabilities, it offers a user-friendly interface for interacting with databases using plain English queries.

Notifications You must be signed in to change notification settings

pareekshitreddy/QuerySense-Natural-Language-to-SQL-Converter-Database-Query-Tool

Folders and files

NameName
Last commit message
Last commit date

Latest commit

94f4106 · Feb 9, 2024

History

8 Commits
Feb 8, 2024
Feb 9, 2024
Feb 8, 2024
Feb 9, 2024
Feb 8, 2024
Feb 8, 2024
Feb 8, 2024
Feb 8, 2024

Repository files navigation

QuerySense: Natural Language to SQL Converter & Database Query Tool

End-to-end LLM application enables seamless conversion of natural language queries into SQL (Structured Query Language) queries, along with querying an SQLite database. Leveraging the Gemini-pro API for language model capabilities, it offers a user-friendly interface for interacting with databases using plain English queries.

Features:

  • Natural Language Interface: Easily input queries in everyday language and let the application handle translation into SQL.
  • End-To-End Solution: From inputting text queries to fetching results from the database, this app provides a comprehensive solution.
  • Database Compatibility: Compatible with SQLite databases, ensuring easy integration and demonstration.
  • User-Friendly Interface: Intuitive design for smooth navigation and interaction.
  • Fast and Efficient: Utilizes efficient algorithms for quick conversion and retrieval of results.

How to Use:

  1. Run the Application: Execute the following command in your terminal to run the application locally:

    streamlit run app.py
  2. Input Text Query: Enter your query in natural language format into the provided text input field.

  3. Translate: Click on the 'Translate' button to convert your text query into SQL.

  4. Execute Query: Once the translation is complete, execute the SQL query to retrieve results from the connected SQLite database.

  5. View Results: The results will be displayed within the application interface for easy access.

Technologies Used:

  • Python: Backend server environment and application logic.
  • Streamlit: Web application framework for building interactive web applications.
  • Gemini-pro API: Leveraged for language model capabilities.
  • SQLite: SQL database for demonstration purposes.

Installation:

To install and run the application locally, follow these steps:

  1. Clone this repository to your local machine.

    git clone https://github.com/pareekshitreddy/QuerySense-Natural-Language-to-SQL-Converter-Database-Query-Tool
  2. Install dependencies.

    pip install -r requirements.txt
  3. Start the application.

    streamlit run app.py

Future Improvements:

  • Enhanced Language Support: Incorporate support for multiple languages for broader user accessibility.
  • Advanced Query Optimization: Implement optimizations for complex queries to improve efficiency.
  • User Authentication: Introduce user authentication for secure access to databases.
  • Integration with External APIs: Allow integration with external APIs for data enrichment and expansion of query capabilities.

About

End-to-end Streamlit application enables seamless conversion of natural language queries into SQL (Structured Query Language) queries, along with querying an SQLite database. Leveraging the Gemini-pro API for language model capabilities, it offers a user-friendly interface for interacting with databases using plain English queries.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published