Zakia commited on
Commit
a52d12d
1 Parent(s): cba1611

change input_dict

Browse files
Files changed (1) hide show
  1. app.py +10 -1
app.py CHANGED
@@ -31,11 +31,20 @@ def predict(model, input_df):
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
 
 
 
39
  title = "DIabetes-related Amputation Risk Calculator (DIARC)"
40
 
41
  description = "A diabetes-related amputation machine learning model trained on the diabetes dataset from the Inkosi Albert Luthuli Central Hospital (IALCH) in Durban, KwaZulu-Natal, South Africa."
 
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
+
36
+ #input_dict = {"AGE": 70.0, "GENDER": 0.0, "RACE": 1.0, "DIABETES_CLASS":0.0}
37
+
38
+
39
+ input_dict = {"AGE": 70, "GENDER": "F", "RACE": "Asian", "DIABETES_CLASS":"Type 2 diabetes"}
40
+
41
+
42
  input_df = pd.DataFrame([input_dict])
43
  return "ALLAH: "+predict(model=model, input_df=input_df) # calls the predict function when 'submit' is clicked
44
 
45
 
46
+
47
+
48
  title = "DIabetes-related Amputation Risk Calculator (DIARC)"
49
 
50
  description = "A diabetes-related amputation machine learning model trained on the diabetes dataset from the Inkosi Albert Luthuli Central Hospital (IALCH) in Durban, KwaZulu-Natal, South Africa."