Spaces:
Running
Running
Deploy PyCaret model baseline_dt_20250426_212853.pkl with fixed indentation
Browse files
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
|
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
|
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
|