Support Query Classification System

Support Query Classification System

Enter a customer query to automatically analyze and classify it.

1. Enter Customer Query

Analysis results will appear here.

Category

${lastAnalysis.category}

Priority

${lastAnalysis.priority}

Sentiment

${lastAnalysis.sentiment}

`; document.getElementById('pdf-chart-image').src = confidenceChart.toBase64Image(); const reportEl = document.getElementById('pdf-report'); reportEl.classList.remove('hidden'); const canvas = await html2canvas(reportEl, { scale: 2 }); reportEl.classList.add('hidden'); const imgData = canvas.toDataURL('image/png'); const { jsPDF } = window.jspdf; const pdf = new jsPDF({ orientation: 'p', unit: 'in', format: 'letter' }); const pdfWidth = pdf.internal.pageSize.getWidth(); const pdfHeight = (canvas.height * pdfWidth) / canvas.width; pdf.addImage(imgData, 'PNG', 0, 0, pdfWidth, pdfHeight); pdf.save('Query-Analysis-Report.pdf'); } document.getElementById('classifyBtn').addEventListener('click', classifyQuery); document.getElementById('downloadPdfBtn').addEventListener('click', generatePdf); });
Scroll to Top