No puppy (or human) is perfect, and during the housebreaking process, there WILL be "accidents." Count on it and accept it. If you can’t deal with cleaning puppy excrement off your expensive Oriental carpet, think again about whether you’re really ready to own a puppy. An adult (housebroken) dog might be more your speed.
In any case, assuming you can accept the fact that accidents will happen, what do you do about it? First, here’s what you don’t do. Do not ever under any circumstance hold the puppy’s nose to the puddle or pile on the floor. Not only is it cruel, following that old wive’s tale is counterproductive. Although the pup will recognize what the mess is, a dog is incapable of making the intuitive leap that you’re angry because the mess is in the wrong place. Plus, punishing a dog "after the fact" doesn’t ever work because studies show that if there is more than a three-second delay between the act and the punishment, the dog has no idea what it’s being punished for, which results in nothing more than a dog that’s afraid of you.
A better approach is to praise the puppy when she goes in the right place. If you do catch the pup in mid-accident, interrupt her. Startle her by making a loud noise such as clapping your hands. Then rush the puppy outside so you can praise her for going in the right place.
As far as clean up goes, experts say that you should never let your dog see you clean up the mess, so put the dog in a different room while you clean up. Dogs have a tendency to relieve themselves in the same spot over and over again. You may not smell it anymore but your dog does. Because a dog’s nose is so much more sensitive than ours, be sure to clean up with an enzymatic cleaner such as Nature’s Miracle which removes the odor to the dog as well. (Yes, after housebreaking three puppies in the last three years, you know I’ve got a gallon-size jug of that stuff in my cabinet.)
Housebreaking a puppy may take a while, but look at the bright side, it’s nowhere near as difficult or time-consuming as housebreaking a human.