MHuzaifaa commited on
Commit
13d7887
·
verified ·
1 Parent(s): e7caa96

Update src/app.py

Browse files
Files changed (1) hide show
  1. src/app.py +3 -3
src/app.py CHANGED
@@ -134,7 +134,7 @@ st.markdown("""
134
 
135
  # Load Resources
136
  @st.cache_resource
137
- def load_resources():
138
  # CHANGE: Remove '../' because 'models' is now a subdirectory of 'src'
139
  models_dir = os.path.join(os.path.dirname(__file__), 'models')
140
  model_path = os.path.join(models_dir, 'best_model.pkl')
@@ -150,7 +150,7 @@ st.markdown("""
150
  return model, encoders, kmeans
151
 
152
  @st.cache_resource
153
- def load_new_artifacts():
154
  try:
155
  # CHANGE: Remove '../'
156
  models_dir = os.path.join(os.path.dirname(__file__), 'models')
@@ -162,7 +162,7 @@ st.markdown("""
162
  return None
163
 
164
  @st.cache_data
165
- def load_data_sample():
166
  # CHANGE: Keep '../' to go up to the root, then look for 'data'
167
  data_dir = os.path.join(os.path.dirname(__file__), '../data/crimedataset')
168
  try:
 
134
 
135
  # Load Resources
136
  @st.cache_resource
137
+ def load_resources():
138
  # CHANGE: Remove '../' because 'models' is now a subdirectory of 'src'
139
  models_dir = os.path.join(os.path.dirname(__file__), 'models')
140
  model_path = os.path.join(models_dir, 'best_model.pkl')
 
150
  return model, encoders, kmeans
151
 
152
  @st.cache_resource
153
+ def load_new_artifacts():
154
  try:
155
  # CHANGE: Remove '../'
156
  models_dir = os.path.join(os.path.dirname(__file__), 'models')
 
162
  return None
163
 
164
  @st.cache_data
165
+ def load_data_sample():
166
  # CHANGE: Keep '../' to go up to the root, then look for 'data'
167
  data_dir = os.path.join(os.path.dirname(__file__), '../data/crimedataset')
168
  try: