louiecerv commited on
Commit
6a575cc
·
1 Parent(s): 6b44a5c
Files changed (1) hide show
  1. app.py +17 -17
app.py CHANGED
@@ -222,23 +222,23 @@ X_test = pd.DataFrame(X_test, columns=feature_names)
222
  if 'models_trained' not in st.session_state:
223
  st.session_state['models_trained'] = False
224
 
225
- # ML Models
226
- st.subheader("Machine Learning Models")
227
-
228
- # Initialize session state for models
229
- if 'models' not in st.session_state:
230
- st.session_state['models'] = {
231
- "Logistic Regression": LogisticRegression(),
232
- "Naive Bayes": GaussianNB(),
233
- "SVM": SVC(),
234
- "Decision Tree": DecisionTreeClassifier(),
235
- "Random Forest": RandomForestClassifier(),
236
- "Gradient Boosting": GradientBoostingClassifier(),
237
- "MLP Neural Network": MLPClassifier()
238
- }
239
-
240
- # Create tabs for different models
241
- model_tabs = st.tabs(st.session_state['models'].keys())
242
 
243
  # Train the models and store them in session state
244
  if not st.session_state['models_trained']:
 
222
  if 'models_trained' not in st.session_state:
223
  st.session_state['models_trained'] = False
224
 
225
+ # ML Models
226
+ st.subheader("Machine Learning Models")
227
+
228
+ # Initialize session state for models
229
+ if 'models' not in st.session_state:
230
+ st.session_state['models'] = {
231
+ "Logistic Regression": LogisticRegression(),
232
+ "Naive Bayes": GaussianNB(),
233
+ "SVM": SVC(),
234
+ "Decision Tree": DecisionTreeClassifier(),
235
+ "Random Forest": RandomForestClassifier(),
236
+ "Gradient Boosting": GradientBoostingClassifier(),
237
+ "MLP Neural Network": MLPClassifier()
238
+ }
239
+
240
+ # Create tabs for different models
241
+ model_tabs = st.tabs(st.session_state['models'].keys())
242
 
243
  # Train the models and store them in session state
244
  if not st.session_state['models_trained']: