Skip to content

Commit

Permalink
fix: wrong task selection
Browse files Browse the repository at this point in the history
Task option was mistaken because of capital letter
  • Loading branch information
gabrielgcbs committed Jun 14, 2023
1 parent 0f9667b commit 56426ef
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions src/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 56426ef

Please sign in to comment.