Saving a model in Keras requires just one line of code. To save the generator model, add the following line:
# Specify the path for the generator model
gen_model.save("directory/for/the/generator/model.h5")
Similarly, save the discriminator model by adding the following line:
# Specify the path for the discriminator model
dis_model.save("directory/for/the/discriminator/model.h5")