Someone who sees a great Torah scholar recites: “Blessed are You, Lord our God, King of the universe, Who has shared of His wisdom with those who revere Him.”
There is even a blessing recited if one sees a non-Jew who has made an outstanding contribution in his field, such as a Nobel Prize winner: “Blessed are You, Lord our God, King of the universe, Who has given of His wisdom to human beings.” The same blessing is recited for someone Jewish who is not God-fearing. However, if the person is a God-fearing Jew, the blessing on seeing him or her is the same as for a great Torah scholar.