Delete app.py
Browse files
app.py
DELETED
|
@@ -1,23 +0,0 @@
|
|
| 1 |
-
|
| 2 |
-
import streamlit as st
|
| 3 |
-
import pandas as pd
|
| 4 |
-
from huggingface_hub import hf_hub_download
|
| 5 |
-
import joblib
|
| 6 |
-
|
| 7 |
-
st.title("Tourism Package Purchase Prediction")
|
| 8 |
-
|
| 9 |
-
model_path = hf_hub_download("TheHumanAgent/tour_pkg_prediction_model","model.pkl")
|
| 10 |
-
model = joblib.load(model_path)
|
| 11 |
-
|
| 12 |
-
st.subheader("Enter Customer Details")
|
| 13 |
-
|
| 14 |
-
age = st.number_input("Age", 18, 100)
|
| 15 |
-
city = st.selectbox("City Tier", [1, 2, 3])
|
| 16 |
-
passport = st.selectbox("Passport", [0, 1])
|
| 17 |
-
|
| 18 |
-
input_df = pd.DataFrame([[age, city, passport]],
|
| 19 |
-
columns=["Age","CityTier","Passport"])
|
| 20 |
-
|
| 21 |
-
if st.button("Predict"):
|
| 22 |
-
pred = model.predict(input_df)[0]
|
| 23 |
-
st.success(f"Prediction: {'Will Purchase' if pred==1 else 'Will Not Purchase'}")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|