Skip to content

Commit

Permalink
Merge pull request #4 from gabrielgcbs/dev
Browse files Browse the repository at this point in the history
fix: wrong task selection
  • Loading branch information
gabrielgcbs authored Jun 14, 2023
2 parents 0f9667b + 56426ef commit 95ec3e6
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 95ec3e6

Please sign in to comment.