Spaces:
Runtime error
Repo Guidelines
This repository contains the LLM-based Cancer Risk Assessment Assistant.
Core Technologies
- FastAPI for the web framework
- LangChain for LLM orchestration
- uv for environment and dependency management
- hydra: for configuration management
Coding Philosophy
- Prioritize clarity and reusability.
- Favor simple replication over heavy abstraction.
- Keep comments short and only where the code isn't self-explanatory.
- Avoid verbose docstrings for simple functions.
Testing
- Write meaningful tests that verify core functionality and prevent regressions.
- Run tests with
uv run pytest.
Development Setup
- Create the virtual environment (at '.venv') with
uv sync.
Running commands
- As the repository uses uv, the uv should be used to run all commands, e.g., "uv run python ..." NOT "python ...".
These guidelines apply to the entire repository. A multi-page Streamlit
interface for expert feedback can be launched with uv run streamlit run apps/streamlit_ui/main.py.
The first page, User Profile, allows experts to load or create a profile
stored in st.session_state.user_profile.
The second page, Configuration, lets experts choose the model and knowledge base modules while previewing the generated prompt.
The third page, Assessment, runs the AI analysis, displays a results dashboard, and provides export and chat options.
Important Note for Developers
When making changes to the project, ensure that the following files are updated to reflect the changes:
README.mdAGENTS.mdGEMINI.md
Risk Model Availability
Risk calculators exposed to Gemini-based agents include:
- Gail - Breast cancer risk
- Claus - Breast cancer risk based on family history
- Tyrer-Cuzick - Breast cancer risk (IBIS model)
- BOADICEA - Breast and ovarian cancer risk (via CanRisk API)
- PLCOm2012 - Lung cancer risk
- LLPi - Liverpool Lung Project improved model for lung cancer risk (8.7-year prediction)
- CRC-PRO - Colorectal cancer risk
- PCPT - Prostate cancer risk
- Extended PBCG - Prostate cancer risk (extended model)
- Prostate Mortality - Prostate cancer-specific mortality prediction
- MRAT - Melanoma risk (5-year prediction)
- aMAP - Hepatocellular carcinoma (liver cancer) risk
- QCancer - Multi-site cancer differential
Register additional models in src/sentinel/risk_models/__init__.py so they are available system-wide.