A newer version of the Gradio SDK is available: 6.13.0
metadata
title: Clinical Trial Matcher
emoji: π¬
colorFrom: blue
colorTo: purple
sdk: gradio
sdk_version: 6.2.0
app_file: app.py
pinned: false
license: mit
π¬ Clinical Trial Matcher
Search and filter clinical trials from ClinicalTrials.gov with AI-powered ranking.
Features
- π Keyword Search: Search clinical trials by disease, condition, or treatment
- π Country Filter: Filter trials by country/location
- π Status Filter: Filter by recruitment status (Recruiting, Completed, etc.)
- π€ AI-Powered Ranking: Use Hugging Face LLMs (like DeepSeek-V3.2) to intelligently rank results by relevance
- π Detailed Results: View inclusion/exclusion criteria, sponsor information, and more
How to Use
- Enter search keywords (e.g., "cancer", "diabetes", "PDAC")
- Optionally filter by country (default: Germany)
- Optionally filter by recruitment status
- Click "Search Clinical Trials"
- After results appear, optionally enter ranking terms and click "Rank Results" for AI-powered relevance ranking
AI-Powered Ranking
After your initial search, you can use AI to rank results by relevance:
- Enter specific terms you want to prioritize (e.g., "KRAS mutation", "immunotherapy")
- Click "Rank Results" to reorder studies by AI-determined relevance
- The model analyzes each study's title, summary, conditions, and inclusion criteria
Setup for Hugging Face Spaces
Required Files
- app.py - Main Gradio application (already provided)
- llm_service.py - LLM service for ranking (copy from
backend/llm_service.py) - requirements.txt - Python dependencies (use
requirements_gradio.txt)
Environment Variables (Secrets)
Add these in your Space settings β Secrets:
HUGGINGFACE_API_TOKEN- Your Hugging Face API token (required for ranking)USE_HF_API- Set totrueto use Hugging Face Inference APIDEEPSEEK_MODEL- Model to use (default:deepseek-ai/DeepSeek-V3.2)
Getting a Hugging Face API Token
- Go to Hugging Face Settings
- Create a new token with "Read" permissions
- Add it as a secret in your Space settings
π± Install on Your iPhone/Android
This app can be installed on your phone as a Progressive Web App (PWA)!
iPhone:
- Open this Space in Safari (not Chrome)
- Tap the Share button (square with arrow) at the bottom
- Scroll down and tap "Add to Home Screen"
- Tap "Add"
Android:
- Open this Space in Chrome
- Tap the menu (three dots) β "Add to Home screen"
- Confirm installation
The app will appear on your home screen and open like a native app! See PWA_HF_SPACES.md for detailed instructions.
Data Source
All data is sourced from ClinicalTrials.gov, the official database of clinical trials worldwide.
Developer
Dev. by Mackenzie π§‘ | mackenzie@post.harvard.edu for Qs
License
MIT License