Apply formatter (and small refactoring) to the Lite-related frontend code (#5956)
* Apply formatter (and small refactoring) to the Lite-related frontend code
* add changeset
---------
Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>