Losing weight while pregnant

I’m getting TOO big.. I’m 177 at 27 weeks and started at 140.. is it safe to start doing things to lose weight while pregnant? Help Plz