Generally, smiling is not allowed in a visa photo, even when using an automated photo tool. Most countries require a neutral expression, meaning no smiling, frowning, or other expressions.
Your mouth should be closed, your eyes should be open, and you should look directly at the camera. The US State Department specifies that a “neutral facial expression” is required for such pictures.