Spaces:
Running
Running
Circhastic
commited on
Commit
•
af7be88
1
Parent(s):
b54ea30
First version quick fix
Browse files
app.py
CHANGED
@@ -248,13 +248,14 @@ with st.sidebar:
|
|
248 |
st.subheader("An intelligent sales forecasting system")
|
249 |
uploaded_file = st.file_uploader("Upload your store data here to proceed (must atleast contain Date and Sales)", type=["csv"])
|
250 |
if uploaded_file is not None:
|
251 |
-
date_found
|
|
|
252 |
for column in uploaded_file.columns:
|
253 |
if 'Date' in column:
|
254 |
date_found = True
|
255 |
if 'Sales' in column:
|
256 |
sales_found = True
|
257 |
-
if(date_found and sales_found):
|
258 |
st.error('Please upload a csv containing both Date and Sales...')
|
259 |
st.stop()
|
260 |
|
|
|
248 |
st.subheader("An intelligent sales forecasting system")
|
249 |
uploaded_file = st.file_uploader("Upload your store data here to proceed (must atleast contain Date and Sales)", type=["csv"])
|
250 |
if uploaded_file is not None:
|
251 |
+
date_found = False
|
252 |
+
sales_found = False
|
253 |
for column in uploaded_file.columns:
|
254 |
if 'Date' in column:
|
255 |
date_found = True
|
256 |
if 'Sales' in column:
|
257 |
sales_found = True
|
258 |
+
if(date_found == False and sales_found == False):
|
259 |
st.error('Please upload a csv containing both Date and Sales...')
|
260 |
st.stop()
|
261 |
|