Spaces:
Sleeping
Sleeping
Shafeek Saleem
commited on
Commit
·
b73615c
1
Parent(s):
8fa1dcd
ss
Browse files- pages/3_Training the Model.py +19 -13
pages/3_Training the Model.py
CHANGED
@@ -141,29 +141,35 @@ def step3_page():
|
|
141 |
st.write("To initiate the weather forecasting model training process, kindly provide a sufficient and relevant dataset with weather-related attributes in .csv format for uploading. This dataset will be crucial for the model's training and accuracy.")
|
142 |
# Display the image and information in a grid layout
|
143 |
# if st.button("Upload"):
|
|
|
144 |
col1 = st.columns([1])
|
145 |
with col1[0]:
|
146 |
csv_file = st.file_uploader("Upload CSV", type=['csv'])
|
147 |
if csv_file is not None:
|
148 |
data = process_file(csv_file)
|
149 |
df = pd.DataFrame(data)
|
150 |
-
st.
|
151 |
st.dataframe(df)
|
|
|
152 |
else:
|
153 |
st.error("Please upload a valid .csv file")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
154 |
|
155 |
-
# st.subheader("Step 2: Data Preprocessing and Feature Engineering")
|
156 |
-
# st.write("Now let's preprocess our dataset to handle missing values, outliers and inconsistencies and then perform feature engineering tasks to extract meaningful features from the raw data. Finally we need to separate training variables (X) and target variable (y).")
|
157 |
-
# if st.button("Create Features and Target variable"):
|
158 |
-
# X, y = create_model_inputs(data, 288, 288)
|
159 |
-
# col1, col2 = st.columns([2])
|
160 |
-
# with col1:
|
161 |
-
# st.subheader("Let's display the Features!")
|
162 |
-
# st.dataframe(X)
|
163 |
-
# with col2:
|
164 |
-
# st.subheader("Let's display our Target variable")
|
165 |
-
# st.dataframe(y)
|
166 |
-
#
|
167 |
# st.subheader("Step 3: Data Splitting")
|
168 |
# st.write(
|
169 |
# "Now let's split into training and testing sets. The training set is used to train the machine learning model, and the testing set is used to evaluate its performance.")
|
|
|
141 |
st.write("To initiate the weather forecasting model training process, kindly provide a sufficient and relevant dataset with weather-related attributes in .csv format for uploading. This dataset will be crucial for the model's training and accuracy.")
|
142 |
# Display the image and information in a grid layout
|
143 |
# if st.button("Upload"):
|
144 |
+
state = "data collection"
|
145 |
col1 = st.columns([1])
|
146 |
with col1[0]:
|
147 |
csv_file = st.file_uploader("Upload CSV", type=['csv'])
|
148 |
if csv_file is not None:
|
149 |
data = process_file(csv_file)
|
150 |
df = pd.DataFrame(data)
|
151 |
+
st.info("Let's display the uploaded dataset!")
|
152 |
st.dataframe(df)
|
153 |
+
state = "preprocessing"
|
154 |
else:
|
155 |
st.error("Please upload a valid .csv file")
|
156 |
+
if state == "preprocessing":
|
157 |
+
st.subheader("Step 2: Data Preprocessing and Feature Engineering")
|
158 |
+
st.write("Now let's preprocess our dataset to handle missing values, outliers and inconsistencies and then perform feature engineering tasks to extract meaningful features from the raw data. Finally we need to separate training variables (X) and target variable (y).")
|
159 |
+
# if st.button("Create Features and Target variable"):
|
160 |
+
X, y = create_model_inputs(data, 288, 288)
|
161 |
+
col1, col2 = st.columns([2])
|
162 |
+
state = "splitting"
|
163 |
+
with col1:
|
164 |
+
st.subheader("Let's display the Features!")
|
165 |
+
st.dataframe(X)
|
166 |
+
with col2:
|
167 |
+
st.subheader("Let's display our Target variable")
|
168 |
+
st.dataframe(y)
|
169 |
+
else:
|
170 |
+
pass
|
171 |
+
|
172 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
173 |
# st.subheader("Step 3: Data Splitting")
|
174 |
# st.write(
|
175 |
# "Now let's split into training and testing sets. The training set is used to train the machine learning model, and the testing set is used to evaluate its performance.")
|