'mediapipe hair segmentation in Javascript

How would I convert this demo into a standalone script that runs in the background without needing to press the 'run' button or display the code? I've inspected the source, but the JS all seems to be minified and hard to decipher.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source