asyncfunctiongenerateImage(){const response =awaitfetch('/api/generate',{method:'POST',headers:{'Content-Type':'application/json',},body:JSON.stringify({prompt:"handsome woman in the city",image_refs:[],width:512,height:512}),});const data =await response.json();const imgElement = document.getElementById('generatedImage');
imgElement.src =`data:image/png;base64,${data.image}`;}