Upload folder using huggingface_hub
Browse files
app.py
CHANGED
|
@@ -11,7 +11,7 @@ model_path = hf_hub_download(
|
|
| 11 |
model = joblib.load(model_path)
|
| 12 |
|
| 13 |
# Streamlit UI for Insurance Charges Prediction
|
| 14 |
-
st.title("🌴
|
| 15 |
st.write("Fill in the customer information below and click **Predict**.")
|
| 16 |
|
| 17 |
# User input
|
|
@@ -71,28 +71,12 @@ if st.button("Predict"):
|
|
| 71 |
prediction = (prediction_proba >= classification_threshold).astype(int)
|
| 72 |
result = "Take the Tourism Package" if prediction == 1 else "Not to Take the Tourism Package"
|
| 73 |
#st.write(f"Based on the information provided, the customer is likely to {result}.")
|
| 74 |
-
if prediction == 1
|
| 75 |
-
color = "#16a34a"
|
| 76 |
-
bg = "#ecfdf5"
|
| 77 |
-
emoji = "🌴✨"
|
| 78 |
-
else:
|
| 79 |
-
color = "#dc2626"
|
| 80 |
-
bg = "#fef2f2"
|
| 81 |
-
emoji = "🚫🌴"
|
| 82 |
|
| 83 |
st.markdown(
|
| 84 |
f"""
|
| 85 |
-
|
| 86 |
-
|
| 87 |
-
background:{bg};
|
| 88 |
-
border-radius:12px;
|
| 89 |
-
border:1px solid #e5e7eb;
|
| 90 |
-
font-size:17px;
|
| 91 |
-
font-family:'Segoe UI', sans-serif;
|
| 92 |
-
">
|
| 93 |
-
<b>{emoji} Customer is likely to
|
| 94 |
-
<span style='color:{color};'>{result}</span></b>
|
| 95 |
-
</div>
|
| 96 |
""",
|
| 97 |
unsafe_allow_html=True
|
| 98 |
)
|
|
|
|
| 11 |
model = joblib.load(model_path)
|
| 12 |
|
| 13 |
# Streamlit UI for Insurance Charges Prediction
|
| 14 |
+
st.title("🌴Tourism Package Prediction App🌴")
|
| 15 |
st.write("Fill in the customer information below and click **Predict**.")
|
| 16 |
|
| 17 |
# User input
|
|
|
|
| 71 |
prediction = (prediction_proba >= classification_threshold).astype(int)
|
| 72 |
result = "Take the Tourism Package" if prediction == 1 else "Not to Take the Tourism Package"
|
| 73 |
#st.write(f"Based on the information provided, the customer is likely to {result}.")
|
| 74 |
+
color = "#16a34a" if prediction == 1 else "#dc2626" # nice green/red
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 75 |
|
| 76 |
st.markdown(
|
| 77 |
f"""
|
| 78 |
+
Based on the information provided, the customer is likely to
|
| 79 |
+
<b><span style='color:{color}; font-size:18px;'>{result}</span></b>.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 80 |
""",
|
| 81 |
unsafe_allow_html=True
|
| 82 |
)
|