<commit_before>from flask import Flask, render_template, request
from flask import jsonify

app = Flask(__name__)

settemp = 0

@app.route('/', methods=["GET", "POST"])
def index():
    return render_template("main.html")

@app.route('/bbqcontrol', methods=["GET", "POST"])
def bbqcontrol():
    if request.method == 'POST':
        global settemp
        settemp = int(request.form["settemp"])
        #Call bbqcontrol.py
    return render_template("bbqcontrol.html")

@app.route('/bbqcontrol/settemp')
def test():
    return jsonify(temp=settemp)
	
@app.route('/bbqcontrol/bbqvalues', methods=["GET", "POST"])
def bbqvalues():
    if request.method == 'POST':
        def add_message():
		content = request.get_json()
		print content
	return content<commit_msg>flask_app.py<commit_after>from flask import Flask, render_template, request
from flask import jsonify

app = Flask(__name__)

settemp = 0

@app.route('/', methods=["GET", "POST"])
def index():
    return render_template("main.html")

@app.route('/bbqcontrol', methods=["GET", "POST"])
def bbqcontrol():
    if request.method == 'POST':
        global settemp
        settemp = int(request.form["settemp"])
        #Call bbqcontrol.py
    return render_template("bbqcontrol.html")

@app.route('/bbqcontrol/settemp')
def test():
    return jsonify(temp=settemp)

@app.route('/bbqcontrol/bbqvalues', methods=["GET", "POST"])
def bbqvalues():
    values = {"actualtemp":"", "u":"", "ui_prev":"", "e_prev":""}
    if request.method == 'POST':
        values = request.get_json(force=True)
        return jsonify(values)
        #print content
    return jsonify(values)
{'fraction_non_alphanumeric': 0.16594960049170251, 'fraction_numerical': 0.001229256299938537, 'mean_word_length': 4.1847133757961785, 'pattern_counts': {'":': 4, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1243772', 'n_tokens_mistral': 537, 'n_tokens_neox': 517, 'n_words': 120}