Training
Can you please share how to train this model with my own data set
Hi,
I would like to retrain the model with my dataset too...Can you please provide the code for training?
Hi,
Please can someone share the code to train this model with my database
Hello, may this article would be helpful "https://medium.com/@martinkeywood/fine-tuning-a-t5-small-model-to-generate-sql-from-natural-language-with-92-3-accuracy-fb29e062c638"
Hi thanks, yes this article has been helpful to get things started.
I would like to know, how can I create a custom dataset to train a "Text to SQL" model. How can I create an acceptable custom dataset to proceed with training. Please help
Use excel and pandas that will give you format to the same
import pandas as pd
import os
from google.colab import drive
drive.mount("/content/drive", force_remount=True)
file_path="/content/drive/My Drive/data1.csv"
print (os.path.isfile(file_path))
if os.path.exists(file_path):
print(f"File found at :{file_path}")
#!pip install -U datasets
from datasets import load_dataset , Dataset , DatasetDict
import pandas as pd
df=pd.read_csv(file_path)
#print(df)
#dataset = load_dataset("csv",data_files=file_path)
dataset= Dataset.from_pandas(df)
#print(dataset)
#for d in dataset:
#print(d)
dataset_dict= DatasetDict({"train":dataset})
#print(dataset_dict)
split_dataset=dataset_dict["train"].train_test_split(test_size=0.2)
#print(split_dataset)
#print(split_dataset["train"])
#print(split_dataset["test"])
train_dataset=split_dataset["train"]
test_dataset=split_dataset["test"]
my csv file looks like this may be you can create your own
role content
user What are the personal loans nos for last month
assistant get data from LOS request tabel loan_table
user What are new request for white card
assistant get data from credit_card database table credit_card_request
user What are the personal loans nos for last month
assistant get data from LOS request tabel loan_table
user What are new request for white card
assistant get data from credit_card database table credit_card_request
user What are the personal loans nos for last month
assistant get data from LOS request tabel loan_table
user What are new request for white card
assistant get data from credit_card database table credit_card_request
user What are the personal loans nos for last month
assistant get data from LOS request tabel loan_table
user What are new request for white card
assistant get data from credit_card database table credit_card_request
user What are the personal loans nos for last month
assistant get data from LOS request tabel loan_table
user What are new request for white card
assistant get data from credit_card database table credit_card_request
user What are the personal loans nos for last month
assistant get data from LOS request tabel loan_table
Here do we need to provide prompt with create table everytime , I am looking for something where prompt will be natural language , trying build data extractor for enterprise
Yes you need to provide create table statement each time. You will need to train your model without create table statement.