<commit_before>import flask

app = flask.Flask("Golden Sixpacks Web Interface")

@app.route("/")
def home():
    return flask.render_template(
        "home.html"
    )


poll_data = {
    'award_name': 'The Collaborator',
    'award_description': '',
    'question' : 'Who are you voting for in the category of The Collaborator?',
    'nominees'   : ['Bo', 'Irmak', 'Mike', 'Dean', 'Brian', 'Vlad', 'Mollie', 'Michael']
    }

@app.route('/vote')
def vote():
    return flask.render_template('vote.html', data=poll_data)

@app.route('/save_vote')
def poll():
    vote = request.args.get('field')
    return vote 


if __name__ == '__main__':
    app.config.update(
        DEBUG=True,
    )
    app.run(host='0.0.0.0')
<commit_msg>app now processes a json with all the data<commit_after>import json

import flask


app = flask.Flask("Golden Sixpacks Web Interface")

with open("award_data.json") as award_data_file:
    vote_data = json.load(award_data_file)


@app.route("/")
def home():
    return flask.render_template(
        "home.html"
    )

@app.route('/vote/<award_id>')
def vote(award_id):
    award_id = int(award_id)
    if award_id >= len(vote_data):
        return "DONE"
    else:
        return flask.render_template('vote.html',
                                     data=vote_data[award_id])

@app.route('/save_vote')
def poll():
    vote = request.args.get('field')
    return vote 


if __name__ == '__main__':
    app.config.update(
        DEBUG=True,
    )
    app.run(host='0.0.0.0')

{'fraction_non_alphanumeric': 0.1563949635520212, 'fraction_numerical': 0.005301524188204109, 'mean_word_length': 2.994708994708995, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1909877', 'n_tokens_mistral': 555, 'n_tokens_neox': 531, 'n_words': 114}