Section 294 in The Indian Penal Code, 1860
294. 4[ Obscene acts and songs.-- Whoever, to the annoyance of others,
(a) does any obscene act in any public place, or
(b) sings, recites or utters any obscene song, ballad or words, in or near any public place, shall be punished with imprisonment of either description for a term which may extend to three months, or with fine, or with both.]
Romance is not an obscene act, nor is it an annoyance to others. That law is to protect people from unwanted and intrusive actions of others, like whispering an obscenity or showing a sexually suggestive gesture at a stranger. Not to curb consenting couples being affectionate. That is why the wording 'to the annoyance of others' is present in it.