I presume you're both in the same university. Go no contact with your texting and phone calls for awhile. In the meantime, get a new haircut, get a couple of blood red shirts, and sarge other girls where she can see them.
When you see each other face-to-face, act like nothing happened and just say, "Hi". The less things you say, the better.
She's running away from you because you're chasing her. The more you chase her, the farther and farther you'll drive her away.
When she initiates the texting, wait 30 minutes to one hour before you reply. Keep your replies short. Let her initiate a meet up. Don't initiate.
It will be very difficult to recover from this situation. But if you play your cards right and properly project the indifferent, masculine devil-may-care attitude, then you might get another chance at attracting her back.
Keep your masculinity at all times and eventually (hopefully) she'll chase you back. There are no guarantees because you scared her too much with your neediness.

_________________
Approach. Open. Escalate. Isolate
Here are my two essential rules on texting that will save you tons of time and money:
general-questions/topic137931.html