You can jump away when it starts to spit or just jump

More Dilophosaur Encountering Tips