Kevin Fink commited on
Commit
8786178
·
1 Parent(s): f2baba8
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -108,8 +108,8 @@ def fine_tune_model(model, dataset_name, hub_id, api_key, num_epochs, batch_size
108
  model_inputs = tokenizer(
109
  examples['text'],
110
  #max_length=max_length, # Set to None for dynamic padding
111
- #truncation=True,
112
- #padding='max_length',
113
  #return_tensors='pt',
114
  padding=True,
115
  )
@@ -118,7 +118,7 @@ def fine_tune_model(model, dataset_name, hub_id, api_key, num_epochs, batch_size
118
  labels = tokenizer(
119
  examples['target'],
120
  #max_length=128, # Set to None for dynamic padding
121
- #truncation=True,
122
  #padding='max_length',
123
  #text_target=examples['target'],
124
  #return_tensors='pt',
 
108
  model_inputs = tokenizer(
109
  examples['text'],
110
  #max_length=max_length, # Set to None for dynamic padding
111
+ truncation=True,
112
+ padding='max_length',
113
  #return_tensors='pt',
114
  padding=True,
115
  )
 
118
  labels = tokenizer(
119
  examples['target'],
120
  #max_length=128, # Set to None for dynamic padding
121
+ truncation=True,
122
  #padding='max_length',
123
  #text_target=examples['target'],
124
  #return_tensors='pt',