I am trying to build a face expression recognition app with face api and reactjs. On locally the app is working fine. but when i deploy to github pages i am getting the below error
when i use serve -s build on my local machine, i am getting this error
This is my code to load the models,
const loadModels = useCallback(() => {
Promise.all([
faceapi.nets.tinyFaceDetector.loadFromUri("/models"),
faceapi.nets.faceLandmark68Net.loadFromUri("/models"),
faceapi.nets.faceRecognitionNet.loadFromUri("/models"),
faceapi.nets.faceExpressionNet.loadFromUri("/models"),
]).then(() => {
faceDetection();
});
},[]);
useEffect(() => {
startVideo();
videoRef && loadModels();
}, [loadModels]);
Got any idea why this is happening?

