Spaces:
Running
Running
Circhastic
commited on
Commit
•
b470a83
1
Parent(s):
804d8f9
Fix app
Browse files
app.py
CHANGED
@@ -111,10 +111,10 @@ def series_to_df_exogenous(series):
|
|
111 |
dataframe = dataframe.dropna()
|
112 |
return dataframe
|
113 |
|
114 |
-
|
115 |
@st.cache_data
|
116 |
def series_to_df_dates(series):
|
117 |
-
dataframe = series.
|
|
|
118 |
dataframe['Date'] = dataframe['Date'].dt.strftime('%B %d, %Y')
|
119 |
dataframe[df.columns] = dataframe[df.columns].astype(str)
|
120 |
return dataframe
|
@@ -251,7 +251,7 @@ if 'uploaded' not in st.session_state:
|
|
251 |
with st.sidebar:
|
252 |
st.title("SalesCast")
|
253 |
st.subheader("version 0.1")
|
254 |
-
uploaded_file = st.file_uploader("Upload your Store Data here (must atleast contain Date and
|
255 |
err = 0
|
256 |
if uploaded_file is not None:
|
257 |
if uploaded_file.type != 'text/csv':
|
@@ -311,8 +311,6 @@ if (st.session_state.uploaded):
|
|
311 |
test_y, predictions = np.array(test_y), np.array(fitted)
|
312 |
forecast_accuracy(predictions, test_y)
|
313 |
|
314 |
-
st.title("Forecasted Sales")
|
315 |
-
|
316 |
# Plot
|
317 |
# plt.figure(figsize=(12,8))
|
318 |
# plt.plot(training_y[-80:])
|
|
|
111 |
dataframe = dataframe.dropna()
|
112 |
return dataframe
|
113 |
|
|
|
114 |
@st.cache_data
|
115 |
def series_to_df_dates(series):
|
116 |
+
dataframe = series.to_frame()
|
117 |
+
dataframe = dataframe.reset_index()
|
118 |
dataframe['Date'] = dataframe['Date'].dt.strftime('%B %d, %Y')
|
119 |
dataframe[df.columns] = dataframe[df.columns].astype(str)
|
120 |
return dataframe
|
|
|
251 |
with st.sidebar:
|
252 |
st.title("SalesCast")
|
253 |
st.subheader("version 0.1")
|
254 |
+
uploaded_file = st.file_uploader("Upload your Store Data here (must atleast contain Date and Sales)", type=["csv"])
|
255 |
err = 0
|
256 |
if uploaded_file is not None:
|
257 |
if uploaded_file.type != 'text/csv':
|
|
|
311 |
test_y, predictions = np.array(test_y), np.array(fitted)
|
312 |
forecast_accuracy(predictions, test_y)
|
313 |
|
|
|
|
|
314 |
# Plot
|
315 |
# plt.figure(figsize=(12,8))
|
316 |
# plt.plot(training_y[-80:])
|