Help! 2 year old bites me when she’s mad at me

Br

My daughter is almost 2 years old and she’s been biting me anytime I have to discipline her. If I tell her not to do something she will come over and try to bite me. If I try to hold her at arms length then she turns her head to bite my hand. I do time out when we are at home, but I don’t know how to make her stop in public. Any advice is greatly appreciated!