Gyimah3 commited on
Commit
5e45726
·
1 Parent(s): a8f812d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -78,14 +78,14 @@ elif social_acc_nav == 'About App':
78
 
79
 
80
  # Loading Machine Learning Objects
81
- @st.cache(allow_output_mutation=True)
82
  def Load_ml_items(relative_path):
83
  "Load ML items to reuse them"
84
  with open(relative_path, 'rb') as file:
85
  loaded_object1 = pickle.load(file)
86
  return loaded_object1
87
 
88
- @st.cache(allow_output_mutation=True)
89
  def Load_ml_items(relative_path):
90
  "Load ML items to reuse them"
91
  with open(relative_path, 'rb') as file:
@@ -104,7 +104,7 @@ Loaded_object = Load_ml_items('ml_items_1')
104
  pipeline, stores, holidays_event = Loaded_object['pipeline'], Loaded_object['stores'], Loaded_object['holidays_event']
105
  train_data= loaded_object1['train_data']
106
  # Setting Function for extracting Calendar features
107
- @st.cache(allow_output_mutation=True)
108
 
109
  def getDateFeatures(df, date ):
110
  df['date'] = pd.to_datetime(df[date])
@@ -125,7 +125,7 @@ def getDateFeatures(df, date ):
125
  return df
126
 
127
  # Setting up variables for input data
128
- @st.cache()
129
  def setup(tmp_df_file):
130
  "Setup the required elements like files, models, global variables, etc"
131
  pd.DataFrame(
 
78
 
79
 
80
  # Loading Machine Learning Objects
81
+ @st.cache_data(allow_output_mutation=True)
82
  def Load_ml_items(relative_path):
83
  "Load ML items to reuse them"
84
  with open(relative_path, 'rb') as file:
85
  loaded_object1 = pickle.load(file)
86
  return loaded_object1
87
 
88
+ @st.cache_data(allow_output_mutation=True)
89
  def Load_ml_items(relative_path):
90
  "Load ML items to reuse them"
91
  with open(relative_path, 'rb') as file:
 
104
  pipeline, stores, holidays_event = Loaded_object['pipeline'], Loaded_object['stores'], Loaded_object['holidays_event']
105
  train_data= loaded_object1['train_data']
106
  # Setting Function for extracting Calendar features
107
+ @st.cache_data(allow_output_mutation=True)
108
 
109
  def getDateFeatures(df, date ):
110
  df['date'] = pd.to_datetime(df[date])
 
125
  return df
126
 
127
  # Setting up variables for input data
128
+ @st.cache_data()
129
  def setup(tmp_df_file):
130
  "Setup the required elements like files, models, global variables, etc"
131
  pd.DataFrame(