How to prepare text data for transformer model?

hai , i wish to create a transformer model to generate articles on two specific topics,can any one help me prepare data for the train the model?