Exercise bike or running machine

Would sitting on an exercise bike for 30 mins be as beneficial as a 30 walk on running machine unable to run at moment?

I breastfeed so need to eat carbs im really trying to loose weoght its not happening