MCPcopy Create free account
hub / github.com/DavidHDev/react-bits / load

Function load

src/content/Backgrounds/GridScan/GridScan.jsx:669–679  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

667 useEffect(() => {
668 let canceled = false;
669 const load = async () => {
670 try {
671 await Promise.all([
672 faceapi.nets.tinyFaceDetector.loadFromUri(modelsPath),
673 faceapi.nets.faceLandmark68TinyNet.loadFromUri(modelsPath)
674 ]);
675 if (!canceled) setModelsReady(true);
676 } catch {
677 if (!canceled) setModelsReady(false);
678 }
679 };
680 load();
681 return () => {
682 canceled = true;

Callers 1

GridScanFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected