Streamlit app for medical image and text inference using Google's MedGemma model in MLX format, running locally on Mac with Apple Silicon.
- Single-column UI with text input and optional image upload
- Collapsible settings for thinking trace and system instruction
- System instruction auto-adjusts based on whether an image is attached
- Fully local inference on Apple Silicon via MLX
Requires:
- Mac with Apple Silicon
- Python 3.12
- uv
- Hugging Face token with access to
google/medgemma-1.5-4b-it
uv syncCreate a .env file:
HF_TOKEN=your_token_here
uv run streamlit run streamlit_app.pyuv run ruff check . # Lint
uv run ruff format . # Format
uv run ty check # Type check
uv run pytest # Run tests