There is a way to avoid it. If you really want to be a gentleman and not have your eyes drawn towards naughty places, you just need to make it difficult. Instead of sitting across from her you could have sat next her. It does take some advanced planning.
However if you're stuck in a position where it's easy to look, there's just no stopping it.