Spaces:
Runtime error
Runtime error
A newer version of the Gradio SDK is available:
6.5.1
metadata
title: Olist Text-to-SQL Agent
emoji: π€
colorFrom: blue
colorTo: purple
sdk: gradio
sdk_version: 4.44.0
app_file: app_gradio.py
pinned: false
license: mit
π€ Olist Text-to-SQL Agent
Convert natural language questions into SQL queries using a fine-tuned Mistral-7B model.
π― Features
- Fine-Tuned Model: Mistral-7B-Instruct-v0.2 fine-tuned with QLoRA on Olist e-commerce dataset
- Natural Language to SQL: Ask questions in plain English, get executable SQL queries
- Real Database: Query against actual Olist e-commerce data (100K+ orders)
- Interactive UI: Built with Gradio for easy interaction
π How to Use
- Type your question in natural language
- Click "Generate SQL & Execute"
- View the generated SQL query and results
π‘ Example Questions
- "How many orders are there?"
- "What are the top 5 best-selling products?"
- "Show total revenue by customer state"
- "Which sellers have the highest ratings?"
- "List all orders from SΓ£o Paulo"
π οΈ Tech Stack
- Model: Mistral-7B-Instruct-v0.2 (fine-tuned with QLoRA)
- Frontend: Gradio
- Database: SQLite (Olist e-commerce dataset)
- ML Libraries: PyTorch, Transformers, PEFT, BitsAndBytes
π Model Details
- Base Model: mistralai/Mistral-7B-Instruct-v0.2
- Fine-Tuned Model: mhdakmal80/Olist-SQL-Agent-Final
- Training Method: QLoRA (4-bit quantization)
- Training Data: 1000+ synthetic question-SQL pairs
- Accuracy: 90% on test set
π About
This project demonstrates:
- Fine-tuning large language models (7B parameters)
- Parameter-efficient fine-tuning with QLoRA
- Production deployment of ML models
- Full-stack application development
Built by mhdakmal80