CosmickVisions commited on
Commit
2c92d1a
ยท
verified ยท
1 Parent(s): 459419a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -11
app.py CHANGED
@@ -159,7 +159,6 @@ st.markdown(
159
  h1, h2, h3, h4, h5, h6 {
160
  color: #00f7ff !important; /* Headings to cyan */
161
  }
162
-
163
  /* Styles for loader */
164
  .loader {
165
  border: 5px solid #f3f3f3;
@@ -169,7 +168,6 @@ st.markdown(
169
  height: 30px;
170
  animation: spin 2s linear infinite;
171
  }
172
-
173
  @keyframes spin {
174
  0% { transform: rotate(0deg); }
175
  100% { transform: rotate(360deg); }
@@ -279,7 +277,8 @@ def animated_progress_bar(progress_var, message="Processing..."):
279
  time.sleep(0.01) # reduced sleep timer as its getting too long
280
 
281
  # --- Main App Logic ---
282
- if app_mode == "Data Upload":
 
283
  st.title("๐Ÿ“ค Data Upload & Analysis")
284
 
285
  uploaded_file = st.file_uploader("Upload Dataset", type=["csv", "xlsx"])
@@ -305,7 +304,7 @@ if app_mode == "Data Upload":
305
  pr = generate_profile(df)
306
  st_profile_report(pr)
307
 
308
- elif app_mode == "Smart Cleaning":
309
  st.title("๐Ÿงผ Intelligent Data Cleaning")
310
 
311
  if st.session_state.raw_data is not None:
@@ -414,7 +413,7 @@ elif app_mode == "Smart Cleaning":
414
  with col2:
415
  st.write("Cleaned Data", df.head(3))
416
 
417
- elif app_mode == "Advanced EDA":
418
  st.title("๐Ÿ” Advanced Exploratory Analysis")
419
 
420
  if st.session_state.cleaned_data is not None:
@@ -476,7 +475,7 @@ elif app_mode == "Advanced EDA":
476
  except Exception as e:
477
  st.error(f"Error generating plot: {e}")
478
 
479
- elif app_mode == "Model Training":
480
  st.title("๐Ÿค– Model Training Studio")
481
 
482
  if st.session_state.cleaned_data is not None:
@@ -647,8 +646,8 @@ elif app_mode == "Model Training":
647
  except Exception as e:
648
  st.error(f"Error during training: {e}")
649
 
650
- # Predictions Section
651
- elif app_mode == "Predictions":
652
  st.title("๐Ÿ”ฎ Make Predictions")
653
 
654
  if st.session_state.model is not None and st.session_state.preprocessor is not None:
@@ -665,6 +664,7 @@ elif app_mode == "Predictions":
665
 
666
  if st.button("Predict"):
667
  try:
 
668
  input_df = pd.DataFrame([input_data])
669
  # Preprocess input
670
  input_processed = preprocessor.transform(input_df)
@@ -684,9 +684,8 @@ elif app_mode == "Predictions":
684
  st.error(f"Error during prediction: {e}")
685
  else:
686
  st.warning("Please train a model first.")
687
-
688
-
689
- elif app_mode == "Visualization Lab":
690
  st.title("๐Ÿ“Š Advanced Visualization Lab")
691
 
692
  if st.session_state.cleaned_data is not None:
 
159
  h1, h2, h3, h4, h5, h6 {
160
  color: #00f7ff !important; /* Headings to cyan */
161
  }
 
162
  /* Styles for loader */
163
  .loader {
164
  border: 5px solid #f3f3f3;
 
168
  height: 30px;
169
  animation: spin 2s linear infinite;
170
  }
 
171
  @keyframes spin {
172
  0% { transform: rotate(0deg); }
173
  100% { transform: rotate(360deg); }
 
277
  time.sleep(0.01) # reduced sleep timer as its getting too long
278
 
279
  # --- Main App Logic ---
280
+
281
+ if app_mode == "Data Upload": #Check
282
  st.title("๐Ÿ“ค Data Upload & Analysis")
283
 
284
  uploaded_file = st.file_uploader("Upload Dataset", type=["csv", "xlsx"])
 
304
  pr = generate_profile(df)
305
  st_profile_report(pr)
306
 
307
+ elif app_mode == "Smart Cleaning": #Check
308
  st.title("๐Ÿงผ Intelligent Data Cleaning")
309
 
310
  if st.session_state.raw_data is not None:
 
413
  with col2:
414
  st.write("Cleaned Data", df.head(3))
415
 
416
+ elif app_mode == "Advanced EDA": #Check
417
  st.title("๐Ÿ” Advanced Exploratory Analysis")
418
 
419
  if st.session_state.cleaned_data is not None:
 
475
  except Exception as e:
476
  st.error(f"Error generating plot: {e}")
477
 
478
+ elif app_mode == "Model Training": #Check
479
  st.title("๐Ÿค– Model Training Studio")
480
 
481
  if st.session_state.cleaned_data is not None:
 
646
  except Exception as e:
647
  st.error(f"Error during training: {e}")
648
 
649
+ #Predictions
650
+ elif app_mode == "Predictions": #Check
651
  st.title("๐Ÿ”ฎ Make Predictions")
652
 
653
  if st.session_state.model is not None and st.session_state.preprocessor is not None:
 
664
 
665
  if st.button("Predict"):
666
  try:
667
+
668
  input_df = pd.DataFrame([input_data])
669
  # Preprocess input
670
  input_processed = preprocessor.transform(input_df)
 
684
  st.error(f"Error during prediction: {e}")
685
  else:
686
  st.warning("Please train a model first.")
687
+
688
+ elif app_mode == "Visualization Lab":
 
689
  st.title("๐Ÿ“Š Advanced Visualization Lab")
690
 
691
  if st.session_state.cleaned_data is not None: