my kitten keeps scratching and biting me

she keeps jumping and attacking me (even as i type this) it's really irritating

she even bites and scratches my face, nose, neck, fingers, hand, arm, leg, foot and hair i don't know what to do

oddly she sleeps next to me and doesn't mind my existence when she's sleepy

tips please, anything is appreciated !!!