Update app.py
Browse files
app.py
CHANGED
|
@@ -73,7 +73,7 @@ elif social_acc_nav == 'About App':
|
|
| 73 |
st.sidebar.markdown("This App predicts the sales for product families sold at Favorita stores using regression model.")
|
| 74 |
st.sidebar.markdown("")
|
| 75 |
st.sidebar.markdown("[ Visit Github Repository for more information](https://github.com/Kyei-frank/Regression-Project-Store-Sales--Time-Series-Forecasting)")
|
| 76 |
-
st.sidebar.markdown("For mom❄️ and
|
| 77 |
st.sidebar.markdown("")
|
| 78 |
|
| 79 |
|
|
@@ -85,7 +85,7 @@ def Load_ml_items(relative_path):
|
|
| 85 |
loaded_object1 = pickle.load(file)
|
| 86 |
return loaded_object1
|
| 87 |
|
| 88 |
-
@st.cache_data(
|
| 89 |
def Load_ml_items(relative_path):
|
| 90 |
"Load ML items to reuse them"
|
| 91 |
with open(relative_path, 'rb') as file:
|
|
@@ -103,8 +103,9 @@ loaded_object1 = Load_ml_items('ML_items')
|
|
| 103 |
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_data(
|
| 108 |
|
| 109 |
def getDateFeatures(df, date ):
|
| 110 |
df['date'] = pd.to_datetime(df[date])
|
|
|
|
| 73 |
st.sidebar.markdown("This App predicts the sales for product families sold at Favorita stores using regression model.")
|
| 74 |
st.sidebar.markdown("")
|
| 75 |
st.sidebar.markdown("[ Visit Github Repository for more information](https://github.com/Kyei-frank/Regression-Project-Store-Sales--Time-Series-Forecasting)")
|
| 76 |
+
st.sidebar.markdown("For mom❄️ and Dad❄️.")
|
| 77 |
st.sidebar.markdown("")
|
| 78 |
|
| 79 |
|
|
|
|
| 85 |
loaded_object1 = pickle.load(file)
|
| 86 |
return loaded_object1
|
| 87 |
|
| 88 |
+
@st.cache_data()
|
| 89 |
def Load_ml_items(relative_path):
|
| 90 |
"Load ML items to reuse them"
|
| 91 |
with open(relative_path, 'rb') as file:
|
|
|
|
| 103 |
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 |
+
|
| 107 |
# Setting Function for extracting Calendar features
|
| 108 |
+
@st.cache_data()
|
| 109 |
|
| 110 |
def getDateFeatures(df, date ):
|
| 111 |
df['date'] = pd.to_datetime(df[date])
|