Loading...
IXth

Image Upload and Text Extraction

document.getElementById('image').onchange = function() { let formData = new FormData(); formData.append('image', this.files[0]); fetch('process.py', { method: 'POST', body: formData }) .then(response => response.text()) .then(text => { document.getElementById('result').innerHTML = text; }) .catch(error => { console.error(error); }); };