QueryGen
1.0.0
QueryGen is a Streamlit application that allows you to generate SQL queries based on natural language prompts and CSV file inputs. It uses LangChain's SQL query generation capabilities and the ChatGroq language model to interpret user prompts and generate optimized SQL queries tailored to the uploaded CSV data.
Demo : Link
https://github.com/Pragateeshwaran/QueryGen.git
pip install -r requirements.txt
GenAi.py
with your actual API key.cd QueryGen
streamlit run app.py
The application will open in your default web browser.
Upload one or more CSV files using the file uploader in the sidebar.
Enter your natural language query in the text input field.
The generated SQL query and its result will be displayed on the page.
app.py
: The main Streamlit application file that handles the user interface and file uploads.csv_db.py
: A utility module that creates a SQLite database from the uploaded CSV files.GenAi.py
: This module contains functions for generating SQL queries from natural language prompts using LangChain and ChatGroq.