It really depends on your reason for leaving. If you have to go to work or have another obligation, then the expectant mother will likely just be happy that you took time out of your day to stop by. However, if you don't have any reason for leaving other than you don't like baby showers, then it would be considered rude to leave early.