After text preprocessing using Textvectorization, we define input layer with shape (1, ).

#Start by creating an explicit input layer. It needs to have a shape of
#(1,) (because we need to guarantee that there is exactly one string
#input per batch), and the dtype needs to be ‘string’.
#model.add(tf.keras.Input(shape=(1,), dtype=tf.string))

For more details refer tf.keras.layers.TextVectorization