Flask – How to send a value to JavaScript function during Python script to update Progress Bar?

Solution
# ...
return render_template("home.html", **{
    'total1': total1,
    'total2': total2
})


const total1 = document.getElementById('total1');
const total2 = document.getElementById('total2');
// ...