change input_df
Browse files
app.py
CHANGED
|
@@ -30,8 +30,9 @@ def predict(model, input_df):
|
|
| 30 |
|
| 31 |
# the parameters in this function, actually gets the inputs for the prediction
|
| 32 |
def predict_amputation(age, gender, race, diabetes_type):
|
| 33 |
-
input_dict = {"AGE": 70.0, "GENDER_F": 0.0, "RACE_Asian": 1.0, "RACE_Black": 0.0, "RACE_Coloured": 0.0, "RACE_Other": 0.0, "RACE_White": 0.0, "DIABETES_CLASS_Type 1 diabetes":0.0}
|
| 34 |
-
|
|
|
|
| 35 |
return "ALLAH: "+predict(model=model, input_df=input_df) # calls the predict function when 'submit' is clicked
|
| 36 |
|
| 37 |
|
|
|
|
| 30 |
|
| 31 |
# the parameters in this function, actually gets the inputs for the prediction
|
| 32 |
def predict_amputation(age, gender, race, diabetes_type):
|
| 33 |
+
#input_dict = {"AGE": 70.0, "GENDER_F": 0.0, "RACE_Asian": 1.0, "RACE_Black": 0.0, "RACE_Coloured": 0.0, "RACE_Other": 0.0, "RACE_White": 0.0, "DIABETES_CLASS_Type 1 diabetes":0.0}
|
| 34 |
+
input_dict = {"AGE": 70.0, "GENDER": 0.0, "RACE": 1.0, "DIABETES_CLASS":0.0}
|
| 35 |
+
input_df = pd.DataFrame([input_dict])
|
| 36 |
return "ALLAH: "+predict(model=model, input_df=input_df) # calls the predict function when 'submit' is clicked
|
| 37 |
|
| 38 |
|