From 56426ef83fb554d81a205a358e24b44c1459e1de Mon Sep 17 00:00:00 2001 From: gabrielgcbs Date: Wed, 14 Jun 2023 17:05:00 -0300 Subject: [PATCH] fix: wrong task selection Task option was mistaken because of capital letter --- src/main.py | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/src/main.py b/src/main.py index 450cbcb..ff9ffe1 100644 --- a/src/main.py +++ b/src/main.py @@ -14,15 +14,7 @@ # Constants FILENAME = "prediction_results.csv" - -# Functions -def disable_option_selection() -> None: - if not st.session_state.run_model: - st.session_state.run_model = True - if st.session_state.run_model: - # if True, sets to False, and vice-versa - st.session_state.radio_disabled = True - + def load_data(file: pd.DataFrame) -> pd.DataFrame: df = pd.read_csv(file) st.dataframe(df.head(), hide_index=True) @@ -127,8 +119,7 @@ def run_pipeline( task: str='classification' ) -> str: - # disable_option_selection() - if task == 'classification': + if task.lower() == 'classification': y_pred, report = run_classifier(X, y, X_to_predict, nominal_cols) else: y_pred, report = run_regressor(X, y, X_to_predict, nominal_cols)