How do I Combine two CNN models (h5 format)?
You can put a dense layer combining both outputs.

model1 = tf.keras.models.load_model('/kaggle/input/models/model1.h5')
model2 = tf.keras.models.load_model('/kaggle/input/models/basic_cnn.h5')

inputs = tf.keras.layers.Input(shape=input_shape)
combined = tf.keras.layers.Concatenate()([model1(inputs), model2(inputs)])
outputs = tf.keras.layers.Dense(n_outputs)(combined)

model3 = tf.keras.models.Model(inputs, outputs)


Set input_shape and n_output accordingly to your data and targets.

You should then freeze your pre-trained weights and train the final dense layer to correctly choose which weight to assign to outputs of your models.

model1.trainable = False
model2.trainable = False

model3.fit(your_data)