Skip to content

An application which uses streamlit interface and converts user's query into SQL query, executes it on a database, and then returns the result.

License

Notifications You must be signed in to change notification settings

Aaryan015/Natural-language-to-SQL

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 

Repository files navigation

An LLM-powered application which takes user queries related to a database -> converts the query into a SQL query -> executes the query on the db -> returns the result in text and table format✨


Features: 🪄

  1. Uses OpenAI's API to process user queries and convert it into SQL query.
  2. The application is able to extract the relevant information from the database based on the query.
  3. The list of tables in the database is available on the top in the Streamlit interface. You can use this list to query relevant information.

Setup: 🧰

  1. Clone this repository:
git clone https://github.com/Aaryan015/Natural-language-to-SQL.git
  1. Install the necessary libraries:
pip install streamlit openai pandas python-dotenv
  1. Create a .env file and place the API key in it.
  2. Place a sample database file (.db) in the same directory.
  3. Run the application:
python -m streamlit run app.py
  1. Input your query.

About

An application which uses streamlit interface and converts user's query into SQL query, executes it on a database, and then returns the result.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages