This project converts natural language queries into SQL statements using machine learning and natural language processing techniques.
- Preprocessing of natural language queries
- Model training for text-to-SQL translation
- Inference pipeline for converting text to SQL
- Dataset download and inspection utilities
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
-
Clone the repository
https://github.com/DeveloperAromal/Text_to_SQL.git cd Text_to_SQL -
Create a virtual environment (recommended)
python -m venv venv # On Windows venv\Scripts\activate # On macOS/Linux source venv/bin/activate
-
Install dependencies
pip install -r requirements.txt
-
Run the code
python main.py
- Python 3.11 or higher
- All dependencies listed in
requirements.txt
- Model and pipeline configurations can be found in
src/config/model.conf.yaml.
- The processed dataset is located at
src/processed/dataset/train.csv. - Use
src/pipeline/download_dataset.pyto 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.