This is a simple implementation of Is Conditional Generative Modeling all you need for Decision-Making?. You just need to use simple gym and pytorch.
Using
collect_data.ipynb you can collect data from CartPole-v0
You can collect data from CartPole-v0 using ''' python main.py ''' then you can train.