Signe22 commited on
Commit
fabcece
·
verified ·
1 Parent(s): 6b68cc2

Update src/streamlit_app.py

Browse files
Files changed (1) hide show
  1. src/streamlit_app.py +2 -5
src/streamlit_app.py CHANGED
@@ -85,11 +85,8 @@ def call_api(df: pd.DataFrame):
85
  return np.array(r.json()["probabilities"])
86
 
87
  # Cache model to make it faster
88
- @st.cache_resource
89
- def load_model():
90
- return joblib.load("diabetes_prediction_model_20251007.pkl")
91
-
92
- pipe = load_model()
93
 
94
  # Initiate state
95
  if "df" not in st.session_state:
 
85
  return np.array(r.json()["probabilities"])
86
 
87
  # Cache model to make it faster
88
+ MODEL_PATH = os.path.join("src", "diabetes_prediction_model_20251007.pkl")
89
+ pipe = joblib.load(MODEL_PATH)
 
 
 
90
 
91
  # Initiate state
92
  if "df" not in st.session_state: