{% extends 'base.html' %} {% block title %}Analisis Sentimen{% endblock %} {% block content %}
Input Komentar
Model: {{ model_nama }}
Tulis komentar dalam Bahasa Indonesia. Analisis menggunakan model {{ model_nama }} yang telah dilatih pada data MBG.
{% if hasil %}
Hasil Analisis
Komentar yang Dianalisis
"{{ komentar }}"
Sentimen Komentar
{% if hasil.label == 'Positif' %}😊{% elif hasil.label == 'Negatif' %}😞{% else %}😐{% endif %} {{ hasil.label }}
Tingkat Keyakinan Model
{{ hasil.confidence }}%
Probabilitas Per Kelas
{% for lbl, val, cls in [('Positif', hasil.prob_positif, 'hijau'), ('Negatif', hasil.prob_negatif, 'merah'), ('Netral', hasil.prob_netral, 'abu')] %}
{{ lbl }} {{ val }}%
{% endfor %}
{% endif %}
{% endblock %}