| --- |
| title: TrialPath |
| emoji: π₯ |
| sdk: docker |
| app_port: 7860 |
| colorFrom: blue |
| colorTo: purple |
| --- |
| |
| # TrialPath π₯ |
|
|
| AI-powered clinical trial matching system for NSCLC (Non-Small Cell Lung Cancer) patients. |
|
|
| ## Overview |
|
|
| TrialPath helps patients understand which clinical trials they may qualify for by: |
| - Extracting patient information from medical documents using AI |
| - Matching patients to relevant clinical trials from ClinicalTrials.gov |
| - Providing gap analysis to transform "rejection" into actionable next steps |
| - Offering a clear patient journey with 5 guided steps |
|
|
| ## Features |
|
|
| β
**Multi-modal Document Upload** - Upload medical records, pathology reports, and lab results (PDF, images) |
| β
**AI-Powered Extraction** - MedGemma 4B extracts structured patient profiles from unstructured documents |
| β
**Smart Trial Matching** - Searches ClinicalTrials.gov with semantic understanding of eligibility criteria |
| β
**Gap Analysis** - Identifies what's missing for trial eligibility and suggests next steps |
| β
**Privacy-First** - No data storage, all processing in-session |
|
|
| ## Tech Stack |
|
|
| - **Frontend**: Streamlit (Python) |
| - **AI Models**: |
| - Google Gemini 3 Pro (orchestration & planning) |
| - MedGemma 4B (medical document extraction) |
| - **Data Source**: ClinicalTrials.gov API v2 |
| - **Workflow Engine**: Parlant (agentic framework) |
|
|
| ## Current Status |
|
|
| π§ **Proof of Concept** - Models and UI are functional with mock data. Live AI integrations in progress. |
|
|
| - β
UI: 5-page patient journey implemented |
| - β
Data Models: 5 Pydantic v2 contracts (PatientProfile, SearchAnchors, TrialCandidate, etc.) |
| - β
Services: MedGemma, Gemini, ClinicalTrials API clients ready |
| - π§ Agent: Parlant journey orchestration pending |
| - π― Scope: NSCLC only, synthetic patients (no real PHI) |
|
|
| ## Demo Mode |
|
|
| The app runs in demo mode by default with synthetic patient data. To enable full AI features: |
|
|
| 1. Set `GEMINI_API_KEY` in Hugging Face Space secrets |
| 2. (Optional) Set `MEDGEMMA_ENDPOINT_URL` for MedGemma extraction |
| 3. (Optional) Set `HF_TOKEN` for Hugging Face authentication |
|
|
| ## Local Development |
|
|
| ```bash |
| # Install dependencies |
| pip install -r requirements.txt |
| |
| # Run the app |
| streamlit run streamlit_app.py |
| ``` |
|
|
| ## License |
|
|
| MIT License - See LICENSE file for details |
|
|
| ## Contact |
|
|
| For questions or feedback, please open an issue on GitHub. |
|
|
| --- |
|
|
| Built with β€οΈ for patients navigating clinical trial enrollment |
|
|