Downloads · 30 days
7
0% of all-time downloads
shahrukhx01/distilbart-cnn-12-6-text2sql
distilbart-cnn-12-6-text2sql is a machine learning model from shahrukhx01. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for transformers.
The distilbart-cnn-12-6-text2sql is fine-tuned on WIKISQL dataset.
Downloads · 30 days
7
0% of all-time downloads
All-time downloads
2.4K
Public
Repo size
2.4 GB
Likes
2
Public
Click a slice to open those files.
.bin1.2 GB · 100%
From the Hugging Face model README
The distilbart-cnn-12-6-text2sql is fine-tuned on WIKISQL dataset.
from transformers import BartTokenizer, BartForConditionalGeneration, BartConfig
model = BartForConditionalGeneration.from_pretrained('shahrukhx01/distilbart-cnn-12-6-text2sql')
tokenizer = BartTokenizer.from_pretrained('shahrukhx01/distilbart-cnn-12-6-text2sql')
TEXT_QUERY = "what is the temperature of berlin "
inputs = tokenizer([TEXT_QUERY], max_length=1024, return_tensors='pt')
# Generate SQL
text_query_ids = model.generate(inputs['input_ids'], num_beams=4, max_length=5, early_stopping=True)
print([tokenizer.decode(g, skip_special_tokens=True, clean_up_tokenization_spaces=False) for g in text_query_ids])