{% set current_training_status = training_status %} {% set training_running = current_training_status.state == "running" %} {% set train_disabled = filter_results_available or training_running %}

Spam Email Classification Dashboard

AI-powered email analysis with continuous learning from your feedback

Upload labeled CSV to retrain the model and reclassify existing emails.

Total Emails
{{ stats.total }}
{% if filter_results_available %}
Spam
{{ stats.spam }}
Ham
{{ stats.ham }}
Undecided
{{ stats.undecided }}
{% else %} {% endif %}
{% if current_training_status.state == "running" %}
Training in progress
{{ current_training_status.message or "Training is running in the background..." }}
{% elif upload_status and upload_message %}
{% if upload_status == "error" %}Action needed{% elif upload_status == "success" %}Done{% else %}Status{% endif %}
{{ upload_message }}
{% elif current_training_status.state == "completed" %}
Analysis ready
{{ current_training_status.message }}
{% elif current_training_status.state == "error" %}
Training failed
{{ current_training_status.message }}
{% elif not filter_results_available %}
Dataset required for filtering results
Upload a labeled CSV dataset to generate spam, ham, undecided, and accuracy results for these emails.
{% endif %} {% if active_filter %}
Filtered view
Showing {{ filtered_total }} {{ active_filter }} email{% if filtered_total != 1 %}s{% endif %}. Show all emails
{% endif %}
{% if emails is not defined or emails|length == 0 %}
No emails found
{% else %} {% for email in emails %} {% endfor %} {% endif %}