Your dog may try to sniff, lick or paw at your hand, but do not open your fist or move or pull your hand back till they settle down. Once they stop trying, offer her plenty of praise and bring out the other high-value treat. You may need to practise this a few more times before your dog learns to stop doing the behaviour.
Pro-tip: If your dog refuses to settle down, you can either switch to a lower value, even non-edible item to practise with or have your dog tethered to a stationary surface with a leash and sit at a distance, so they cannot reach it.