Actually the solution in order to use keras format with TensorFlow version 2.16.1 is implied
here More specifically, it is stated by @
t-kalinowski that:
"...users writing new code today should not need to use a separatepreprocess_input() function, the preprocessing steps should be managed as part of the model..."
Thus, you can simply comment out or remove the specific line of code:
x = keras.applications.vgg16.preprocess_input(x) # Apply input value scaling.