I have the code below that works fine:
test_index, train_index = split_data_for_train_and_test(text_data, label_data, test_ratio) y = to_categorical(label_dat