HelloWorld2307 commited on
Commit
bb80d6f
·
verified ·
1 Parent(s): a7d799a

Deploy PyCaret model baseline_dt_20250426_212853.pkl with fixed indentation

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -173,10 +173,10 @@ else:
173
  if pred_col_label in predictions.columns:
174
  st.success(f"Predicted Label: **{predictions[pred_col_label].iloc[0]}**")
175
  # Also show score if available for classification
176
- if pred_col_score in predictions.columns and pycaret_task_module == 'pycaret.classification':
177
  st.info(f"Prediction Score: **{predictions[pred_col_score].iloc[0]:.4f}**")
178
  # Handle regression output (usually just score)
179
- elif pred_col_score in predictions.columns and pycaret_task_module == 'pycaret.regression':
180
  st.success(f"Predicted Value: **{predictions[pred_col_score].iloc[0]:.4f}**")
181
  else:
182
  # Fallback: Display the last column as prediction if specific ones aren't found
 
173
  if pred_col_label in predictions.columns:
174
  st.success(f"Predicted Label: **{predictions[pred_col_label].iloc[0]}**")
175
  # Also show score if available for classification
176
+ if pred_col_score in predictions.columns and APP_PYCARET_TASK_MODULE == 'pycaret.classification':
177
  st.info(f"Prediction Score: **{predictions[pred_col_score].iloc[0]:.4f}**")
178
  # Handle regression output (usually just score)
179
+ elif pred_col_score in predictions.columns and APP_PYCARET_TASK_MODULE == 'pycaret.regression':
180
  st.success(f"Predicted Value: **{predictions[pred_col_score].iloc[0]:.4f}**")
181
  else:
182
  # Fallback: Display the last column as prediction if specific ones aren't found