Skip to content

smaranjitghose/QueryKing

Repository files navigation

A minimalistic application to generate SQL queries using Generative AI built with Python and Streamlit

Tech Stack 💻

  • Python
  • Streamlit
  • OpenAI GPT3

Demo 👇

v.0.0.1 - (HackerRank SQL : Name of Employees Problem)

Set-Up ⚒️

SetUp Icon

  • Ensure you have the latest stable version of Python in your system

  • Open your terminal / command prompt.

  • Clone the repository

    git clone https://github.com/smaranjitghose/QueryKing.git
    
  • Change the directory to the cloned project

    cd QueryKing
    
  • Create a virtual environment

    python -m venv env
    
  • Activate the virtual environment

    • Windows

       env/Scripts/Activate.ps1
      
    • Linux/Mac

      source env/bin/activate
      
  • Check if the virtual environment in the concerned repository is used for python shell

    which python
    
  • Upgrage pip package manager

    python -m pip install --upgrade pip
    
  • Install the dependencies

    pip install -r requirements.txt
    
  • Sign Up for OpenAI API, Go to Settings and Get the API Key

  • Create an environment file

        touch .env
    
  • Paste the API key in the .env file in the following format

    openai_api_key = XXXXXX
    
  • Load the application

    streamlit run ./Home.py
    
  • If the app does not load by itself in your default browser, open a browser of your choice and navigate to http://localhost:8501

  • To stop the application, press CTRL + C in your terminal

  • To deactive the python environment, type in your terminal

    deactivate
    

Acknowledgements 🙏

Acknowledgment Icon

About

A minimalistic application to generate SQL queries using Generative AI built with Python and Streamlit

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks