(file)
| 14 | }); |
| 15 | |
| 16 | async function recognize(file) { |
| 17 | const { |
| 18 | data: { text }, |
| 19 | } = await Tesseract.recognize(file, "eng"); |
| 20 | |
| 21 | loader.style.display = "none"; |
| 22 | result.style.display = "flex"; |
| 23 | result.innerHTML = text; |
| 24 | } |
| 25 | |
| 26 | function readImage(file) { |
| 27 | const reader = new FileReader(); |