saifhmb commited on
Commit
53aff22
·
unverified ·
1 Parent(s): d2d36e8

added model description and key metrics

Browse files
Files changed (1) hide show
  1. app.py +15 -3
app.py CHANGED
@@ -70,9 +70,21 @@ def prediction(Age, EstimatedSalary):
70
  def main():
71
  # giving the webpage a title
72
  st.title("Customer Purchase Prediction ML App")
73
-
74
- Age = st.text_input("Age", "Type Here")
75
- EstimatedSalary = st.text_input("EstimatedSalary", "Type Here")
 
 
 
 
 
 
 
 
 
 
 
 
76
  result = ""
77
  if st.button("Predict"):
78
  result = prediction(Age, EstimatedSalary)
 
70
  def main():
71
  # giving the webpage a title
72
  st.title("Customer Purchase Prediction ML App")
73
+ st.header("Model Description", divider = "gray")
74
+ multi = '''This is a logistic regression classifier trained on social network ads dataset to predict customer purchasing behavior
75
+ based on their Age and Estimated Salary.
76
+ For more details on the model please refer to the model card at https://huggingface.co/saifhmb/social-network-ads-logit-model
77
+ '''
78
+ st.markdown(multi)
79
+ st.header("Model Metrics", divider = "gray")
80
+ st.metrics(label = "Accuracy", value = acc)
81
+ st.metrics(label = "Accuracy", value = acc)
82
+ st.metrics(label = "Precision", value = ps)
83
+ st.metrics(label = "Recall", value = rs)
84
+
85
+ st.markdown("To determine whether a customer will make a purchase, please **enter** the Age and Estimated Salary:")
86
+ Age = st.number_input("Age")
87
+ EstimatedSalary = st.number_input("Estimated Salary", "Type Here")
88
  result = ""
89
  if st.button("Predict"):
90
  result = prediction(Age, EstimatedSalary)