mlops / app (1).py
Supreeth15's picture
Upload app (1).py
d33e9b6 verified
raw
history blame contribute delete
894 Bytes
import streamlit as st
import pandas as pd
import joblib
from huggingface_hub import hf_hub_download
st.set_page_config(page_title="Tourism Predictor", page_icon="✈️")
@st.cache_resource
def load_model():
model_path = hf_hub_download("Supreeth15/tourism-model", "best_model.pkl")
return joblib.load(model_path)
st.title("🌍 Tourism Package Predictor")
st.write("Predict Wellness Tourism Package purchase")
model = load_model()
st.success("βœ… Model loaded: Bagging")
# Input form
col1, col2 = st.columns(2)
with col1:
age = st.number_input("Age", 18, 100, 30)
income = st.number_input("Monthly Income", 0, 200000, 30000)
with col2:
trips = st.number_input("Number of Trips", 0, 20, 2)
passport = st.selectbox("Passport", [0, 1])
if st.button("Predict"):
st.info("Demo prediction interface")
st.write("Model: Bagging")
st.write("ROC-AUC: 0.9584")