Skip to content

Using Transformers and NLP, Text_to_SQL automatically translates natural language questions into SQL, making data access simple and fast.

Notifications You must be signed in to change notification settings

DeveloperAromal/Text_to_SQL

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Text to SQL NLP

This project converts natural language queries into SQL statements using machine learning and natural language processing techniques.

Features

  • Preprocessing of natural language queries
  • Model training for text-to-SQL translation
  • Inference pipeline for converting text to SQL
  • Dataset download and inspection utilities

Project Structure

main.py
requirements.txt
src/
  config/
    model.conf.yaml
  model/
    inference.py
    preprocess.py
    train.py
  output/
  pipeline/
    dep_install.py
    download_dataset.py
    inspect.py
    main_pipeline.py
  processed/
    dataset/
      train.csv

Getting Started

  1. Clone the repository

    https://github.com/DeveloperAromal/Text_to_SQL.git
    cd Text_to_SQL
  2. Create a virtual environment (recommended)

    python -m venv venv
    
    # On Windows
    venv\Scripts\activate
    
    # On macOS/Linux
    source venv/bin/activate
  3. Install dependencies

    pip install -r requirements.txt
  4. Run the code

    python main.py

Prerequisites

  • Python 3.11 or higher
  • All dependencies listed in requirements.txt

Configuration

  • Model and pipeline configurations can be found in src/config/model.conf.yaml.

Dataset

  • The processed dataset is located at src/processed/dataset/train.csv.
  • Use src/pipeline/download_dataset.py to download and prepare datasets.

Note: Ensure the dataset is preprocessed before training the model. You can customize dataset handling in the pipeline scripts as needed.

About

Using Transformers and NLP, Text_to_SQL automatically translates natural language questions into SQL, making data access simple and fast.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Languages