Kevin Fink commited on
Commit
aef99c1
·
1 Parent(s): 066f7c4
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -110,9 +110,9 @@ def fine_tune_model(model, dataset_name, hub_id, api_key, num_epochs, batch_size
110
  #text_target=examples['target'],
111
  return_tensors='pt',
112
  )
113
- labels["input_ids"] = [
114
- [(l if l != tokenizer.pad_token_id else -100) for l in label] for label in labels["input_ids"]
115
- ]
116
  # Add labels to the model inputs
117
  model_inputs["labels"] = labels["input_ids"]
118
  return model_inputs
 
110
  #text_target=examples['target'],
111
  return_tensors='pt',
112
  )
113
+ #labels["input_ids"] = [
114
+ # [(l if l != tokenizer.pad_token_id else -100) for l in label] for label in labels["input_ids"]
115
+ #]
116
  # Add labels to the model inputs
117
  model_inputs["labels"] = labels["input_ids"]
118
  return model_inputs