This is a very common problem with a lot of puppy owners, but don't fear it's a easy issue to solve well most of the time it is. Their are two popular ways to do this, the first is to get a no jump harness but trying to put one of those on can be a nightmare, so we'll go with that if this doesn't work. I know a lot of people saw to knee their dog in the chest if it acts up, but I have heard of dogs DYING from this careless thing to do. What works is simplly telling people when they come over not to pay attention to your dog until they sit. Dogs jump because they are trying to get the persons attention and when the visitor pets your dog it's encouraging them to jump.
How not to be rude to people when telling them not to let your dog jump up. You can simply say before they come in to the house. "We are currently training are dog and if the jump up on you simply turn away from them and make them sit." Usually people are ok with it. But sometimes you need to train the visitor because not everyone listens lol.
So when the dog is sitting allow them to pet them and if they jump up again tell them not to pet them. This is important to teach dogs young. It's easier to stop a 25lb puppy than a 95 lb adult. Just keep using the sit command with your dog when you have visitors.
Don't give up just think puppy's are like kids but you only go through it for at most 2 years not 18.