i usually opt for “i am not in the mood to talk right now,” in a friendly, but firm voice and then turn my attention to my book. it is polite and your right to do so; they’ll either say okay and leave you alone, or they will be rude, at which point you can feel free to ignore them.