-
Notifications
You must be signed in to change notification settings - Fork 3
/
forms.py
33 lines (29 loc) · 1.92 KB
/
forms.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
from flask_wtf import FlaskForm
from wtforms import SelectField, DecimalField, RadioField, SubmitField
from wtforms.validators import InputRequired
class PredictionForm(FlaskForm):
team = SelectField("Home Team")
opp = SelectField("Away Team")
third_per = DecimalField("Third Down Percentage", validators=[InputRequired()])
third_per_allowed = DecimalField("Third Down Percentage", validators=[InputRequired()])
top = DecimalField("Time of Possession", validators=[InputRequired()])
a_top = DecimalField("Time of Possession", validators=[InputRequired()])
first_downs = DecimalField("First Downs", validators=[InputRequired()])
first_downs_allowed = DecimalField("First Downs", validators=[InputRequired()])
pass_yards = DecimalField("Pass Yards", validators=[InputRequired()])
pass_yards_allowed = DecimalField("Pass Yards", validators=[InputRequired()])
penalty_yards = DecimalField("Penalty Yards", validators=[InputRequired()])
a_penalty_yards = DecimalField("Penalty Yards", validators=[InputRequired()])
plays = DecimalField("Plays", validators=[InputRequired()])
a_plays = DecimalField("Plays", validators=[InputRequired()])
rush_yards = DecimalField("Rush Yards", validators=[InputRequired()])
rush_yards_allowed = DecimalField("Rush Yards", validators=[InputRequired()])
sacked = DecimalField("Sacks", validators=[InputRequired()])
sacks = DecimalField("Sacks", validators=[InputRequired()])
turnovers = DecimalField("Turnovers", validators=[InputRequired()])
takeaways = DecimalField("Turnovers", validators=[InputRequired()])
total_yards = DecimalField("Total Yards", validators=[InputRequired()])
total_yards_allowed = DecimalField("Total Yards", validators=[InputRequired()])
model_name = RadioField("Models", choices=[(
"winloss", "Win/Loss Prediction Model"), ("score", "Projected Points Prediction Model ")])
submit = SubmitField("SUBMIT")