In Flask, is there a way to have multiple checkboxes invoke different functions on an HTML input tag?

I have an HTML file with an input tag and two checkboxes. In a Python file I have two functions meant to act on the input tag depending on which checkbox is selected. For some reason, the function meant to calculate the gc content does not work; only the first function seems to work. How do I fix this?

HTML code

<form action="" method='POST' >
    <input name="sequence" type="text"><br>
    <input type="checkbox" id= "count_nuc" name="check" value="check">
    <label for="count_nuc">Count nucleotides</label>

    <input type="checkbox" id= "gc_content" name="check" value="check">
    <label for="gc_content">GC content</label><br>

    <button type="submit" value="submit">Submit</button>
</form>
        
{% if gc_percent %}
<p>GC Percent: {{gc_percent}}</p>
{% endif %}
{% if new_dict %}
<p>Count nucleotides: {{new_dict}}</p>
{% endif %}

Python code

from flask import Flask, render_template, request

app = Flask(__name__)


@app.route("/", methods=['POST', 'GET'])
def count_nucleotides():
    new_dict = {}
    nucleotides = ['A', 'C', 'T', 'G']
    seq = request.form.get('sequence')
    if request.method == 'POST' and 'sequence' in request.form and request.form.get("check"):
        for i in seq:
            if i not in nucleotides:
                return 'Invalid nucleotide(s) found'
            else:
                for j in nucleotides:
                    if j == i:
                        new_dict[i] = seq.count(i)
    return render_template('calculator.html', new_dict=new_dict)


def gc_content():
    gc_percent = 0
    seq = request.form.get('sequence')
    if request.method == 'POST' and 'sequence' in request.form and request.form.get("check"):
        gc_percent += (round(((seq.count('G') + seq.count('C')) * 100 / len(seq)), 2))
    return render_template('calculator.html', gc_percent=gc_percent)


app.run(debug=True)