Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -508,10 +508,10 @@ if st.session_state.get('has_prediction', False):
|
|
| 508 |
st.subheader("📋 Impact Details")
|
| 509 |
|
| 510 |
# Format the table with cleaned names (WITH emojis for table)
|
| 511 |
-
display_df = shap_df[['Feature_Clean_Emoji', 'SHAP Value'
|
| 512 |
-
display_df.columns = ['Factor', 'Impact Amount'
|
| 513 |
display_df['Impact Amount'] = display_df['Impact Amount'].apply(
|
| 514 |
-
lambda x: f"€{abs(x):,.0f}"
|
| 515 |
)
|
| 516 |
display_df = display_df.reset_index(drop=True)
|
| 517 |
|
|
|
|
| 508 |
st.subheader("📋 Impact Details")
|
| 509 |
|
| 510 |
# Format the table with cleaned names (WITH emojis for table)
|
| 511 |
+
display_df = shap_df[['Feature_Clean_Emoji', 'SHAP Value']].copy()
|
| 512 |
+
display_df.columns = ['Factor', 'Impact Amount']
|
| 513 |
display_df['Impact Amount'] = display_df['Impact Amount'].apply(
|
| 514 |
+
lambda x: f"+€{x:,.0f}" if x > 0 else f"-€{abs(x):,.0f}"
|
| 515 |
)
|
| 516 |
display_df = display_df.reset_index(drop=True)
|
| 517 |
|