Update app.py
Browse files
app.py
CHANGED
|
@@ -44,12 +44,12 @@ scheduler = CommitScheduler(
|
|
| 44 |
# the functions runs when 'Submit' is clicked or when a API request is made
|
| 45 |
def insurance_charge_predictor(age, bmi, children, sex, smoker, region):
|
| 46 |
input_data = pd.DataFrame({
|
| 47 |
-
'
|
| 48 |
-
'
|
| 49 |
-
'
|
| 50 |
-
'
|
| 51 |
-
'
|
| 52 |
-
'
|
| 53 |
})
|
| 54 |
|
| 55 |
prediction = model.predict(input_data)
|
|
|
|
| 44 |
# the functions runs when 'Submit' is clicked or when a API request is made
|
| 45 |
def insurance_charge_predictor(age, bmi, children, sex, smoker, region):
|
| 46 |
input_data = pd.DataFrame({
|
| 47 |
+
'age': [age],
|
| 48 |
+
'bmi': [bmi],
|
| 49 |
+
'children': [children],
|
| 50 |
+
'sex': [sex],
|
| 51 |
+
'smoker': [smoker],
|
| 52 |
+
'region': [region]
|
| 53 |
})
|
| 54 |
|
| 55 |
prediction = model.predict(input_data)
|