When the MCP subprocess downloads models (MONET, sentence-transformers)
on first call, progress output fills the 64KB stderr pipe buffer. The
subprocess blocks trying to write stderr while the main process blocks
reading stdout β classic pipe deadlock. Fix by inheriting parent stderr
so download progress prints directly to the container logs.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add timeout and stderr logging to MCP subprocess to debug tool hangsβ
- _recv() now has 300s timeout instead of blocking forever
- _drain_stderr() captures MCP subprocess error output for debugging
- Checks if subprocess died and surfaces exit code
- Log MCP server start confirmation
- Fix max_length: only clear it, don't double-set max_new_tokens
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Remove unused files: old Gradio frontend, dead model code, test artifactsβ
- frontend/ β entire old Gradio UI, replaced by React
- models/explainability.py β old GradCAM, replaced by gradcam_tool.py
- models/medsiglip_convnext_fusion.py β abandoned experimental model
- models/monet_concepts.py β old concept scorer, replaced by monet_tool.py
- test_models.py β one-off test script
- KAGGLE_REPORT.md β temporary report file
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Force MCP tool models to CPU to avoid GPU VRAM contention with MedGemmaβ
- MCP subprocess passes SKINPRO_TOOL_DEVICE=cpu env var
- MONET and ConvNeXt respect this override to stay on CPU
- Prevents OOM/hang on T4 (16GB) where MedGemma already uses ~8GB
- Fix max_length warning: set both max_length=None and max_new_tokens=400 on generation_config
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add RAG Phase 4 management guidance, rebuild guidelines index (286 chunks), post-analysis hint UIβ
- Landing page: sunrise orb with glassmorphism, about section, disclaimer
- Chat page: remove card wrappers from AI responses, plain text rendering
- Tool calls shown as inline status lines with dots/spinners (not cards)
- Thinking segments show animated spinner while active, done dot when complete
- Fix max_new_tokens vs max_length conflict in generation_config
- Fix Gemma3ImageProcessor warning by explicitly loading fast processor
- Add chat route import to backend routes __init__
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Pass HF_TOKEN explicitly to pipeline() for gated model auth
Patient-level chat UI with streaming AI analysis pipeline:
- MedGemma visual examination with stage-by-stage cascade
- ConvNeXt classifier with confidence scores and differential
- MONET feature extraction and Grad-CAM attention maps
- Temporal comparison between sequential lesion images
- Persistent chat history with full cascade replay on reload
- FastAPI backend with SSE streaming + React/TypeScript frontend
- Docker build ready for Hugging Face Spaces deployment