TrialPath / README.md
yakilee's picture
feat: add HuggingFace Spaces deployment configuration
7915030
---
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