<commit_before>from flask import Flask, render_template
from flask.ext.bootstrap import Bootstrap
from flask.ext.wtf import Form
from wtforms import StringField, SubmitField, FormField
from wtforms.validators import Required, Length

app = Flask(__name__)
app.config['SECRET_KEY'] = 'top secret!'
bootstrap = Bootstrap(app)


class NameForm(Form):
    user = StringField('What is your username?', validators=[Required(), Length(1, 32)])
    domain = StringField('What is your team name?', validators=[Required(), Length(1, 16)])
    token = StringField('What is you API token?', validators=[Required(), Length(1, 40)])
    time = FormField('Enter in the # of days to limit (not required)', widget=NumberInput())

    submit = SubmitField('Submit')


@app.route('/', methods=['GET', 'POST'])
def index():
    token = None
    domain = None
    user = None
    time = None

    form = NameForm()
    if form.validate_on_submit():
        token = form.token.data
        form.token.data = ''
        domain = form.domain.data
        form.domain.data = ''
        user = form.user.data
        form.user.data = ''
        time = form.time.data
        form.time.data = ''
    return render_template('index.html', form=form, token=token, domain=domain, user=user, time=time)


if __name__ == '__main__':
    app.run(debug=True, host='0.0.0.0')
<commit_msg>added in flask app and index.html , just geetting the forms right then will integrate func  to page.<commit_after>from flask import Flask, render_template
from flask.ext.bootstrap import Bootstrap
from flask.ext.wtf import Form
from wtforms import StringField, SubmitField, FormField
from wtforms.validators import Required, Length

app = Flask(__name__)
app.config['SECRET_KEY'] = 'top secret!'
bootstrap = Bootstrap(app)


class NameForm(Form):
    user = StringField('What is your username?', validators=[Required(), Length(1, 32)])
    domain = StringField('What is your team name?', validators=[Required(), Length(1, 16)])
    token = StringField('What is you API token?', validators=[Required(), Length(1, 40)])
    time = FormField('Enter in the # of days to limit (not required)')

    submit = SubmitField('Submit')


@app.route('/', methods=['GET', 'POST'])
def index():
    token = None
    domain = None
    user = None
    time = None

    form = NameForm()
    if form.validate_on_submit():
        token = form.token.data
        form.token.data = ''
        domain = form.domain.data
        form.domain.data = ''
        user = form.user.data
        form.user.data = ''
        time = form.time.data
        form.time.data = ''
    return render_template('index.html', form=form, token=token, domain=domain, user=user, time=time)


if __name__ == '__main__':
    app.run(debug=True, host='0.0.0.0')

{'fraction_non_alphanumeric': 0.13542795232936078, 'fraction_numerical': 0.009389671361502348, 'mean_word_length': 3.540983606557377, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, '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': '4676345', 'n_tokens_mistral': 868, 'n_tokens_neox': 829, 'n_words': 241}