Skip to content

Add SHAP explanations to API and Streamlit#6

Merged
BabaKaElijah merged 1 commit into
mainfrom
feature/shap-explanations
Jan 22, 2026
Merged

Add SHAP explanations to API and Streamlit#6
BabaKaElijah merged 1 commit into
mainfrom
feature/shap-explanations

Conversation

@BabaKaElijah

Copy link
Copy Markdown
Owner

Adds SHAP explanations to FastAPI (/explain)
Adds SHAP contributions table to Streamlit
Adds shap to requirements.txt

@BabaKaElijah BabaKaElijah merged commit cfaf5d6 into main Jan 22, 2026
1 check passed

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4f414b02ff

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/predict_pipeline.py
X = preprocessor.transform(input_df)
feature_names = preprocessor.get_feature_names_out()

import shap

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Declare SHAP dependency for package installs

This new import shap introduces a runtime dependency that is only added to requirements.txt, but pyproject.toml still omits shap from [project].dependencies. If users install the app via pip install . (PEP 621), the import will raise ModuleNotFoundError and /explain/Streamlit will fail at runtime; consider adding shap to pyproject.toml dependencies (or an optional extra) so package installs remain functional.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant