saherPervaiz commited on
Commit
1986e1a
·
verified ·
1 Parent(s): cf2ec45

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -108,7 +108,8 @@ if uploaded_file is not None:
108
  model.fit(X_train, y_train)
109
  y_pred = model.predict(X_test)
110
  accuracy = accuracy_score(y_test, y_pred)
111
- results.append([name, accuracy, None])
 
112
 
113
  else:
114
  model_choices = [
@@ -128,7 +129,7 @@ if uploaded_file is not None:
128
 
129
  # Display results in a table
130
  st.subheader("Model Performance Results")
131
- results_df = pd.DataFrame(results, columns=["Model", "Accuracy" if is_classification else "Accuracy (N/A)", "Mean Squared Error" if not is_classification else "MSE (N/A)"])
132
 
133
  # Bold the headers
134
  st.markdown(f"**Model Performance Results**")
 
108
  model.fit(X_train, y_train)
109
  y_pred = model.predict(X_test)
110
  accuracy = accuracy_score(y_test, y_pred)
111
+ classification_rep = classification_report(y_test, y_pred)
112
+ results.append([name, accuracy, classification_rep])
113
 
114
  else:
115
  model_choices = [
 
129
 
130
  # Display results in a table
131
  st.subheader("Model Performance Results")
132
+ results_df = pd.DataFrame(results, columns=["Model", "Accuracy" if is_classification else "Accuracy (N/A)", "Classification Report" if is_classification else "MSE (N/A)"])
133
 
134
  # Bold the headers
135
  st.markdown(f"**Model Performance Results**")