Tokenize_labels fuction error

I am sure I do right but steal give me this error, please help me
TypeError: unsupported operand type(s) for -: ‘list’ and ‘int’

Subtracting an integer from a list is an invalid operation in python. Convert the list to an nd-array using np.asarray before performing an arithmetic operation.

the same issue not fixed

Please click my name and message your notebook as an attachment.

Please fix train_val_split. Labels don’t have anything to do with sentences. You should assign splits of sentences to train and val sets. Do the same for labels.

1 Like

my issue in tokenize_labels , train_val_split it work good

yes thanks you was right, I fixed the train_val_split