MCPcopy Create free account
hub / github.com/expo/examples / loop

Function loop

with-tfjs-camera/src/ModelView.js:43–48  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

41 const onReady = React.useCallback(
42 (images) => {
43 const loop = async () => {
44 const nextImageTensor = images.next().value;
45 const predictions = await model.classify(nextImageTensor);
46 setPredictions(predictions);
47 raf.current = requestAnimationFrame(loop);
48 };
49 loop();
50 },
51 [setPredictions]

Callers 1

ModelView.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected