pawanmall commited on
Commit
1346240
·
verified ·
1 Parent(s): 12495b6

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. app.py +5 -2
app.py CHANGED
@@ -1,18 +1,21 @@
 
 
1
  import streamlit as st
2
  import pandas as pd
3
  import joblib
4
  import os
 
5
 
6
  # Load the trained model
7
  try:
8
  # Assuming the model is saved in the current directory or a known path
9
- model_path = hf_hub_download(repo_id="pawanmall/Visit-with-us", filename="best_tourism_model_v1.joblib")
10
  model = joblib.load(model_path)
11
 
12
  st.success("Model loaded successfully!")
13
  except Exception as e:
14
  st.error(f"Error loading model: {e}")
15
-
16
  st.title("Wellness Tourism Package Purchase Prediction")
17
 
18
  st.write("Enter the customer details to predict the likelihood of purchasing the Wellness Tourism Package.")
 
1
+
2
+
3
  import streamlit as st
4
  import pandas as pd
5
  import joblib
6
  import os
7
+ from huggingface_hub import hf_hub_download # Import hf_hub_download
8
 
9
  # Load the trained model
10
  try:
11
  # Assuming the model is saved in the current directory or a known path
12
+ model_path = hf_hub_download(repo_id="pawanmall/Visit-with-us", filename="best_tourism_model_v1.joblib", repo_type="model")
13
  model = joblib.load(model_path)
14
 
15
  st.success("Model loaded successfully!")
16
  except Exception as e:
17
  st.error(f"Error loading model: {e}")
18
+
19
  st.title("Wellness Tourism Package Purchase Prediction")
20
 
21
  st.write("Enter the customer details to predict the likelihood of purchasing the Wellness Tourism Package.")