ikhlasulakmalh commited on
Commit
2032a93
·
1 Parent(s): 8d5fd1c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +16 -1
app.py CHANGED
@@ -19,7 +19,22 @@ X = pd.DataFrame([symptoms_dict], columns=column_list)
19
  st.write('Generated DataFrame:')
20
  st.write(X)
21
 
22
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
23
 
24
 
25
 
 
19
  st.write('Generated DataFrame:')
20
  st.write(X)
21
 
22
+ # Unpickle classifier
23
+ clf = joblib.load("self_diagnose_model.pkl")
24
+
25
+ # Store inputs into dataframe
26
+ X = pd.DataFrame([[
27
+ age, sex, high_chol, chol_check, bmi, smoker, hda, pa, fruit, veggies, hac, gh, mh, ph, dw, stroke, high_bp
28
+ ]], columns=preds)
29
+
30
+ # Get prediction
31
+ prediction = clf.predict(X)[0]
32
+
33
+ # Output prediction
34
+ if prediction == 0:
35
+ st.text("No Diabetes")
36
+ else:
37
+ st.text("Diabetes")
38
 
39
 
40