genSlide function is used to generate slides for the training