Published
Edited
Jul 3, 2019
24 stars
Insert cell
Insert cell
Tesseract = require("tesseract.js@2.0.0-alpha.11")
Insert cell
Insert cell
viewof result = {
const worker = new Tesseract.TesseractWorker();
const progressBar = html`<section><div></div><progress /></section>`;
worker
.recognize(image)
.progress(progress => {
progressBar.querySelector("div").innerText = progress.status;
progressBar.querySelector("progress").value = progress.progress;
})
.then(result => {
progressBar.value = result.text;
progressBar.dispatchEvent(new CustomEvent("input"));
});
return progressBar;
}
Insert cell
result
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more