Update app.py
Browse files
app.py
CHANGED
@@ -50,7 +50,7 @@ def fine_tune_model(base_model_name, dataset_name):
|
|
50 |
# Pre-process dataset
|
51 |
|
52 |
def preprocess(examples):
|
53 |
-
model_inputs = tokenizer(examples["sql_prompt"], text_target=examples["sql"], max_length=512
|
54 |
return model_inputs
|
55 |
|
56 |
dataset = dataset.map(preprocess, batched=True)
|
|
|
50 |
# Pre-process dataset
|
51 |
|
52 |
def preprocess(examples):
|
53 |
+
model_inputs = tokenizer(examples["sql_prompt"], text_target=examples["sql"], max_length=512, padding="max_length", truncation=True)
|
54 |
return model_inputs
|
55 |
|
56 |
dataset = dataset.map(preprocess, batched=True)
|