saifhmb
commited on
added model description and key metrics
Browse files
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 |
-
|
| 75 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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)
|