I admire your ability to stick to your word and follow through with punishments. Caving in doesn't help anyone.
However...
This situation does not just involve your daughter. It involves your grand child. That child is completely innocent, yet he/she is being punished.
I suggest you let your daughter in until she delivers then kick her out or help HER FIND a place for unwed mothers to live. Check out the links below.
She needs to take responsibility for her actions. Parenting classes are a start. Most hospitals offer them. Planned Parenthood has a great cousiling program to teach her about taking responsibility. Take her there. Guide her just a little further. Then when this is done you can let her go if you still want to.
From personal experience...getting pregnant (unexpectedly) changed my life and I would not change it for anything. I suddenly had a reason to be responsible. I love my kids, hubby, and my life. Give her a chance to adjust and I bet you will see her grow into a woman before her due date.
Best of luck.