No need to write single line of code as we use Cascade Classifier Testing GUI and Haar cascade to detect the smile.
Click here to get the GUI https://github.com/ultimus11/Cascade-Classifier-Testing-GUI
Youtube video for explaination is here: https://youtu.be/fXbEPI5ksJE