Commit
·
2804590
1
Parent(s):
830e6f5
test
Browse files
app.py
CHANGED
@@ -100,11 +100,12 @@ def make_prediction(alcohol, arrest_type, belts, contributed_to_accident, disobe
|
|
100 |
iface = gr.Interface(fn=make_prediction,
|
101 |
inputs=[gr.components.Checkbox(label='Was the driver under the influence of alcohol?'),
|
102 |
#gr.components.Dropdown(label='Choose the arrest type', choices=tf['OneHotEncoder'].transformers_[0][1].categories_[0], value='A - Marked Patrol'),
|
103 |
-
|
104 |
gr.components.Checkbox(label='Were seatbelts used appropriately?'),
|
105 |
gr.components.Checkbox(label='Did the driver actions contribute to an accident?'),
|
106 |
gr.components.Checkbox(label='Was the driver disobedient? (such as failing to display documentation upon request)?'),
|
107 |
-
gr.components.Dropdown(label='Choose the driver city', choices=tf['OrdinalEncoder_VeryHighCardinality'].categories_[0], value='SILVER SPRING'),
|
|
|
108 |
gr.components.Dropdown(label='Driver Gender', choices=['M', 'F', 'N'], value='M'),
|
109 |
gr.components.Checkbox(label='Was the driver driving with Invalid Documentation (such as suspended registration, suspended license, expired registration plates and validation tabs or expired license plate)?'),
|
110 |
gr.components.Dropdown(label='Vehicle Make', choices=tf['OrdinalEncoder_HighCardinality'].categories_[0], value='TOYOTA'),
|
|
|
100 |
iface = gr.Interface(fn=make_prediction,
|
101 |
inputs=[gr.components.Checkbox(label='Was the driver under the influence of alcohol?'),
|
102 |
#gr.components.Dropdown(label='Choose the arrest type', choices=tf['OneHotEncoder'].transformers_[0][1].categories_[0], value='A - Marked Patrol'),
|
103 |
+
'Marked Patrol',
|
104 |
gr.components.Checkbox(label='Were seatbelts used appropriately?'),
|
105 |
gr.components.Checkbox(label='Did the driver actions contribute to an accident?'),
|
106 |
gr.components.Checkbox(label='Was the driver disobedient? (such as failing to display documentation upon request)?'),
|
107 |
+
#gr.components.Dropdown(label='Choose the driver city', choices=tf['OrdinalEncoder_VeryHighCardinality'].categories_[0], value='SILVER SPRING'),
|
108 |
+
'SILVER SPRING',
|
109 |
gr.components.Dropdown(label='Driver Gender', choices=['M', 'F', 'N'], value='M'),
|
110 |
gr.components.Checkbox(label='Was the driver driving with Invalid Documentation (such as suspended registration, suspended license, expired registration plates and validation tabs or expired license plate)?'),
|
111 |
gr.components.Dropdown(label='Vehicle Make', choices=tf['OrdinalEncoder_HighCardinality'].categories_[0], value='TOYOTA'),
|