const img = fs.readFileSync("image.jpg")
tesseract
.recognize(img, config)
.then((text) => {
console.log("Result:", text)
})
.catch((error) => {
console.log(error.message)
})
import Tesseract from 'tesseract.js';
Tesseract.recognize(
'https://tesseract.projectnaptha.com/img/eng_bw.png',
'eng',
{ logger: m => console.log(m) }
).then(({ data: { text } }) => {
console.log(text);
})