generate_slides function

generate slides based on output