feat: Add AraSpell spelling correction endpoint (POST /api/spelling) with lazy model loading - Extract AraSpell pipeline into src/nlp/spelling/ (araspell_rules.py + araspell_service.py) - Pre-download AraBERT encoder-decoder + checkpoint in Dockerfile - Lazy load on first request, contextual=False to save RAM - Update health check to report spelling status
- HF Spaces free tier blocks ALL outbound DNS - no external API calls possible
- Load summarization model locally with float16 (280MB vs 560MB)
- Install CPU-only PyTorch (~200MB vs ~2GB)
- Spelling/punctuation/autocomplete gracefully degrade (return input unchanged)
- Health check accurately reports model availability
fix: DNS endpoint discovery - test multiple HF hostnames to find reachable one
- Add src/hf_inference.py: wrapper for HF Inference API calls
- Update app.py: USE_HF_API flag enables remote inference when HF_API_TOKEN is set
- All routes (summarize, spelling, grammar, punctuation, autocomplete, analyze) support HF API mode
- Health check returns HTTP 200 with all models=true in HF API mode
- No local model loading needed - saves 2GB+ RAM
- Backwards compatible: local models still work when HF_API_TOKEN is not set
Fix: Google link failure now falls back to full sign-in instead of error toast