Hi everyone! I'm fairly new to Javascript but am actively spending time learning. I'm trying to use tesseract.js library for OCR but am unable to get the following sample code running.
The code sample works in Visual Studio Code, where I also include import Tesseract from 'tesseract.js';
as a command whereas in retool I use the following CDN: https://unpkg.com/tesseract.js@v2.1.0/dist/tesseract.min.js
Any help would be greatly appreciated!
Code:
console.log('here-1')
Tesseract
.recognize('https://tesseract.projectnaptha.com/img/eng_bw.png', 'eng', { logger: m => console.log(m) })
.then(({ data: { text } }) => { console.log(text) })
console.log('here-2')