I do one of two things:
Either, I play somthing VERY basic (three blind mice) and ask them to join in. You would be suprised how many people appreciate 'doing' somthing.
Or, I simply refuse to play and direct them to a forthcoming concert performance.
I won't quote the whole thing again, as not to take up the whole page.
It's a very interesting point, and I understand what you mean. Here's my outlook (admitedly an amateur in comparison I assume)
2 things, firstly, I am selfish, when it comes to piano playing, I'm not playing what I think others will like - regardless of the fact I have different pieces for different situations, I'm still essentially just playing what I like, and what I think would fit in a different situation. To summarize - I'm just playing for myself, and adapting what I like hearing, based on what I consider suitable in different situations.
I love being able to produce the music I love to hear, no matter what the situation.
Otherwise i'd just be playing "that tune from frozen" or "can you play something recent"... No i bloody can't. I think that applies (medical aside) to many professions where something can be produced. If you asked a chef for the same thing everytime you saw him, he/she would get pissed off sure, but if you say, make the meal you love to make, or an artist, draw something you love to draw, or a singer, sing something you love to sing, suddenly it doesn't feel like a monkey-dance-request, but appreciation for a skill.
Second, is that even if people are talking, I phase them out and mentally engage with the people that are listening, of which if there is none, i'm fully engaged with myself and the music. I always know, I hear if someone has stopped, or if they've quietened down, if clearly their concentration is on what i'm doing, and so I focus on that.
Funny side-story. My piano is old, reasonably cheap and electric mini-grand style... my gf doesn't have the same appreciation for music unfortunately, and so the base of my piano behind the music stand, often becomes a coaster for her drinks (OH THE TRAVERSTY) as the piano backs onto the sofa. Nevertheless picture the scene, as it so often happens.
She sits down watching tele adjacent to the piano whilst I am deep in practice mode. She places a drink and often leaves to do other things, in that time, my rather mischievous boxer dog seizes the opportunity to jump up the sofa and starts drinking from the cup.
So many times she has asked me how is it possible that I do not notice this going on. And is simply the fact, as mentioned before, if it is only me listening to the beautiful music I can make, I am focusing on nothing other than that and the piano. I don't see anything around me.