IngredientCheck helps usersby scanning labels and checking them against the list of ingredients you input.
Does a simple comparison to match ingredients that users want to avoid.
🎶
Through to mhy love of cooking and hosting, I have found that
- Node: version 15.0.1
- multer: 1.4.2
- cors: 2.8.5
- JavaScript: version 1.1.1
- JSON: version 2.3
- body-parser: 1.19.0
- express: 4.17.1
- nodemon: 2.0.6
From your backend folder perform the following commands:
npm init
npm install express
touch .gitignore
npm i multer
npm install cors
npm install ejs
npm install tesseract.js
*Please note that some features are still a work in progress.
- Check out the backend capabilities!
npm start
- Go to your browser and go to localhost:7001
- Manimulate the string to have ingredients you want it to catch
- upload a label and hit convert
function compareStrings(string, photoWords){
let newString = string.split(' ')
let updatedphotoWords = photoWords.split(' ')
let matchingWords = newString.filter(element => updatedphotoWords.includes(element));
return matchingWords
}
(async () => {
const worker = createWorker();
await worker.load();
await worker.loadLanguage('eng');
await worker.initialize('eng');
const { data: {text} } = await worker.recognize(image);
photoWords = text;
console.log(photoWords = text)
return compareStrings(string, photoWords);
})()
We're looking forward to rolling-out the following features: