Just as children, all dogs are different and "learn" at different rates. It is unrealistic to expect your 5 month old to be completely potty trained just as it would be for any parent to expect their 6 month old to be walking and talking. "Most" dogs are not completely housebroken until 6 months or older. Please be patient with your little one, she can sense your frustration. When she goes potty inside, what are your reaction(s)? Do you make a big deal, scold her, anything along these lines? Or do you simply go about your business of cleaning it up?
Unfortunately, you must watch them constantly and as soon as you see the "signs" (there
are signs

) you must make a noise, pick them up and/or quickly escort them to the door. When they've done their business outside, treat and praise, treat and praise. Use words like "business," "potty," "outside." Personally, we use potty and outside with our girl and have since she was a baby........now all we need do is mention one of those words and she will go on demand. She's also 21 months tomorrow and by no means was she pottying on demand at 5, 6, even 7 or 8 months.
It will take time, patience and consistency on your part. I've inferred from your post that you've got consistency down and that is great. Just give her a little more time and be very patient........one day, it'll just be like a light turned on and she'll know to
only potty outside. If you would like some more information on housebreaking, use the search feature at the top right of your screen to search for threads on this very topic. There is a wealth of information available and believe me, you're not the first person to have asked a question like this.
Good luck!