NaikGayatri commited on
Commit
080149f
·
verified ·
1 Parent(s): 843e278

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. app.py +5 -7
app.py CHANGED
@@ -11,15 +11,13 @@ st.title("Customer Status Prediction")
11
  st.write("""
12
  This web app predicts the **status** of a customer based on their activity and profile information.
13
  """)
 
 
 
 
14
 
15
- # 2️⃣ Load serialized ML model
16
- @st.cache_data
17
- def load_model(model_path):
18
- with open(model_path, "rb") as f:
19
- model = pickle.load(f)
20
- return model
21
 
22
- model = load_model("best_model.pkl") # Replace with your model path
23
 
24
  # 3️⃣ Create UI for user input
25
  st.sidebar.header("Provide Input Features")
 
11
  st.write("""
12
  This web app predicts the **status** of a customer based on their activity and profile information.
13
  """)
14
+ # Load the trained model
15
+ @st.cache_resource
16
+ def load_model():
17
+ return joblib.load("my_model_v1_0.joblib")
18
 
19
+ model = load_model()
 
 
 
 
 
20
 
 
21
 
22
  # 3️⃣ Create UI for user input
23
  st.sidebar.header("Provide Input Features")