π Text-to-SQL with T5 (t5-base
)
This model is a fine-tuned version of t5-base
on a custom Text-to-SQL dataset. It translates natural language questions into corresponding SQL queries.
π Model Details
- Base model: t5-base
- Task: Natural Language to SQL (text-to-SQL)
- Dataset: Small custom dataset (~10β15 examples) of questions and SQL queries
- Language: English
- Fine-tuned by: Priyanshu05
π§ Example
from transformers import T5Tokenizer, T5ForConditionalGeneration
model = T5ForConditionalGeneration.from_pretrained("Priyanshu05/text-to-sql-t5")
tokenizer = T5Tokenizer.from_pretrained("Priyanshu05/text-to-sql-t5")
question = "translate natural language to SQL: show all customers"
inputs = tokenizer(question, return_tensors="pt")
output = model.generate(**inputs)
print(tokenizer.decode(output[0], skip_special_tokens=True))
License
This project is licensed under the Apache-2.0 License.
- Downloads last month
- 0
Inference Providers
NEW
This model isn't deployed by any Inference Provider.
π
Ask for provider support