Ppo implementation

This is the code I have implemented (ppo algo) but this code is not working, each time rewards are continuously decreasing
It will be very helpful if someone can help me
I am currently newbie to this
Btw thanks