Spaces:
Paused
Paused
Update templates/result.html
Browse files12345676 unmodified lines141516171819202122232425262728293031323334353637383940414243449 unmodified lines54555657585960616263648 unmodified lines7374757677787980818283848586878889<!DOCTYPE html><html><head><title>Hasil Sentimen</title><link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet"><script src="https://cdn.jsdelivr.net/npm/chart.js"></script></head>6 unmodified lines<p><b>Keyword:</b> {{ keyword }}</p><p><b>Sumber:</b> {{ source }}</p><!-- PIE --><canvas id="pieChart"></canvas><hr><!-- 📊 PER PLATFORM --><h4>Perbandingan Platform</h4><canvas id="platformChart"></canvas><hr><!-- ☁️ WORDCLOUD --><h4>WordCloud</h4><img src="/static/wordcloud.png" width="500"><hr><!-- 📁 DOWNLOAD --><a href="/download" class="btn btn-success">⬇ Download CSV</a><hr><!-- 📊 EVALUASI --><h4>Evaluasi Model</h4><pre>{{ report }}</pre><hr>9 unmodified lines<td>{{ src }}</td></tr>{% endfor %}</table></div><script>new Chart(document.getElementById('pieChart'), {type: 'pie',data: {8 unmodified lines}});const platformData = {labels: {{ platform_counts.keys()|list }},datasets: [{label: "Positive",data: {{ platform_counts.values()|map(attribute='Positive')|list }}}]};new Chart(document.getElementById('platformChart'), {type: 'bar',data: platformData});</script>12345676 unmodified lines1415161718192021222324252627282930313233343536373839404142434445464748499 unmodified lines596061626364656667686970718 unmodified lines8081828384858687888990919293949596979899<!DOCTYPE html><html><head><title>Hasil</title><link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet"><script src="https://cdn.jsdelivr.net/npm/chart.js"></script></head>6 unmodified lines<p><b>Keyword:</b> {{ keyword }}</p><p><b>Sumber:</b> {{ source }}</p><!-- PIE CHART --><canvas id="pieChart"></canvas><hr><!-- PLATFORM --><h4>Per Platform</h4><canvas id="platformChart"></canvas><hr><!-- WORDCLOUD --><h4>WordCloud</h4><img src="/static/wordcloud.png" width="500"><hr><!-- DOWNLOAD --><a href="/download" class="btn btn-success">⬇ Download CSV</a><hr><!-- EVALUASI --><h4>Evaluasi Model</h4>{% if eval_result.error %}<p class="text-danger">{{ eval_result.error }}</p>{% else %}<p><b>Accuracy:</b> {{ eval_result.accuracy }}</p>{% endif %}<hr>9 unmodified lines<td>{{ src }}</td></tr>{% endfor %}</table></div><script>// pienew Chart(document.getElementById('pieChart'), {type: 'pie',data: {8 unmodified lines}});// platform chartconst labels = {{ platform_counts.keys()|list }};const positive = {{ platform_counts.values()|map(attribute='Positive')|list }};const negative = {{ platform_counts.values()|map(attribute='Negative')|list }};new Chart(document.getElementById('platformChart'), {type: 'bar',data: {labels: labels,datasets: [{ label: 'Positive', data: positive },{ label: 'Negative', data: negative }]}});</script>
templates/result.html+26-16