Skip to content

A Flask-based web application that converts natural language questions into SQL queries using a LoRA-fine-tuned TinyLLaMA model.

Notifications You must be signed in to change notification settings

SwathiR1999/Text2Sql

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Text-to-SQL Generator (TinyLLaMA + LoRA + Flask)

This project is a Flask-based web application that converts natural language questions into SQL queries using a LoRA-fine-tuned TinyLLaMA model. It utilizes the Synthetic-Text-To-SQL dataset for finetuning and is designed to run locally or via a public URL using ngrok.


Demo

Features

  • Converts natural language questions to executable SQL queries
  • Fine-tuned with LoRA (Low-Rank Adaptation) for efficient adaptation
  • Uses TinyLLaMA for lightweight inference
  • Easy deployment with Flask + pyngrok
  • Clean, responsive HTML UI

Getting Started

1. Clone the Repository

git clone https://github.com/SwathiR1999/Text2Sql.git
cd Text2Sql

2. Install requirements

pip install -r requirements.txt

3. Configure pyngrok

Visit ngrok to get your auth token.

from pyngrok import ngrok
ngrok.set_auth_token("YOUR_NGROK_AUTH_TOKEN")

3. Run the app

python app.py

You will see

* ngrok tunnel: <...link...>

Open the link in your browser to access the web app.

About

A Flask-based web application that converts natural language questions into SQL queries using a LoRA-fine-tuned TinyLLaMA model.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published