This error message indicates that you are trying to pass a NumPy array with floating-point data to a TensorFlow function that does not support this data type. TensorFlow requires that all inputs to its functions be tensors, and certain data types, such as floating-point numbers, must be converted into a tensor format that TensorFlow can handle.

To resolve the error, you need to convert the NumPy array to a TensorFlow tensor using the tf.convert_to_tensor function. For example:

import tensorflow as tf

def _process(self, data):
    X = data[1] + " " + data[2]
    Y = pd.get_dummies(data[0], prefix="y").astype(np.float32)
    Y = tf.convert_to_tensor(Y)
    return X, Y, len(data)


This will convert the NumPy array 'Y'into a TensorFlow tensor, allowing it to be passed to TensorFlow functions.

Try to executing the programme and see weather it got resolved.
spam fails_task lang_mismatch pii not_appropriate hate_speech sexual_content quality toxicity humor helpfulness creativity violence