AI-Powered Property Price Prediction Tool (Demonstrator)

"AI-Powered" Property Price Prediction Tool (Demonstrator)

Property & Location Characteristics

Your estimate of average $/sqft for a standard property in this general area.
For condos/townhouses, use a very small value like 0.01 if not applicable.

"AI-Powered" Price Prediction

Enter property features and click "Predict Price (Demo)" on the previous tab.

$${lowerBound.toLocaleString(undefined, {minimumFractionDigits:0, maximumFractionDigits:0})} - $${upperBound.toLocaleString(undefined, {minimumFractionDigits:0, maximumFractionDigits:0})}

(Central Estimate: $${predictedValue.toLocaleString(undefined, {minimumFractionDigits:0, maximumFractionDigits:0})})

`; notesContainerEl.style.display = 'block'; downloadPdfBtn.style.display = 'block'; } // --- PDF Download --- downloadPdfBtn?.addEventListener('click', function () { const { jsPDF } = window.jspdf; const pdfOutputArea = document.getElementById('aipPdfOutputArea'); if (!pdfOutputArea || predictionResultsEl.innerHTML.includes("Please enter property features")) { alert('Please predict the price first before downloading PDF.'); return; } document.getElementById('aipNotesContainer').style.display = 'block'; document.getElementById('aipInputSummaryForPdf').style.display = 'block'; document.getElementById('aipPredictionFactorBreakdown').style.display = 'block'; html2canvas(pdfOutputArea, { scale: 1.5, useCORS: true, backgroundColor: '#ffffff', windowWidth: pdfOutputArea.scrollWidth }) .then(canvas => { const imgData = canvas.toDataURL('image/jpeg', 0.9); const pdf = new jsPDF({ orientation: 'portrait', unit: 'pt', format: 'a4' }); const pdfWidth = pdf.internal.pageSize.getWidth(); const pdfHeight = pdf.internal.pageSize.getHeight(); const margin = 30; let contentWidth = pdfWidth - 2 * margin; const canvasWidth = canvas.width; const canvasHeight = canvas.height; const ratio = canvasWidth / canvasHeight; let imgWidth = contentWidth; let imgHeight = imgWidth / ratio; if (imgHeight > pdfHeight - 2 * margin) { imgHeight = pdfHeight - 2 * margin; imgWidth = imgHeight * ratio; if (imgWidth > contentWidth) { imgWidth = contentWidth; imgHeight = imgWidth / ratio; } } const x = (pdfWidth - imgWidth) / 2; pdf.addImage(imgData, 'JPEG', x, margin, imgWidth, imgHeight, undefined, 'MEDIUM'); pdf.save('AI_Property_Prediction_Demo.pdf'); }) .catch(err => { console.error("Error generating PDF:", err); alert("Error generating PDF. See console for details."); }); }); function escapeHtml(unsafe) { if (typeof unsafe !== 'string') return unsafe === undefined || unsafe === null ? '' : String(unsafe); return unsafe.replace(/&/g, "&").replace(//g, ">").replace(/"/g, """).replace(/'/g, "'"); } switchTab('propertyInputTab'); });
Scroll to Top