This guide covers the two supported deployment targets: Docker / docker-compose (local, VPS, or cloud) and Streamlit Community Cloud (free public demo).
cp .env.example .env # set GOOGLE_API_KEY (users can also enter it in the UI)
docker compose up --build -d
App: http://localhost:8501 โ health endpoint: http://localhost:8501/_stcore/health
docker compose logs -f # follow logs
docker compose ps # status + healthcheck
docker compose down # stop
docker compose up --build -d # rebuild after code changes
python:3.12-slim (small final image, no build tools shipped)appuserHEALTHCHECK on the Streamlit health endpointdocker logs); file log at /tmp/medical_agent.logdocker-compose.yml (adjust to your host).env with your GOOGLE_API_KEYdocker compose up --build -dproxy_http_version 1.1 and the Upgrade/Connection headers.main, main file src/app.pyGOOGLE_API_KEY = "your_key_here"
If omitted, users enter their own key in the sidebar.
https://<app>.streamlit.app URLNotes:
requirements.txt automaticallyEnvironment variables (via .env, compose environment, or platform secrets):
| Variable | Default | Description |
|---|---|---|
GOOGLE_API_KEY |
โ | Gemini API key; if unset, users enter it in the UI |
MODEL_ID |
gemini-flash-latest |
Gemini model used for analysis |
FALLBACK_MODEL_ID |
gemini-3-flash-preview |
Model used automatically when the primary is overloaded (503) or out of quota (429) |
ENABLE_WEB_SEARCH |
true |
Live web search for references; set false to use 1 request/analysis (saves quota) |
DEFAULT_LANGUAGE |
en |
Default UI & report language (en/fr), switchable in the UI |
MAX_IMAGE_SIZE |
5242880 |
Max upload size in bytes (5 MB) |
MAX_ANALYSIS_TIME |
120 |
Analysis timeout (seconds) |
LOG_LEVEL |
INFO |
Logging verbosity |
LOG_FILE |
medical_agent.log |
Optional log file path |
.github/workflows/ci.yml runs on every push/PR to main:
ruff check src/ tests/pytest with coverageTo publish images automatically, add a push step to Docker Hub or GHCR with repository secrets.
This application is for educational purposes only and must not be used for clinical decision-making without review by qualified healthcare professionals.