--- title: Smart Document QA emoji: 📄 colorFrom: blue colorTo: indigo sdk: docker app_port: 7860 pinned: false --- # Smart Document QA FastAPI-based document Q&A with asynchronous processing, grounded answers, and a simple demo UI. Live endpoints: - Demo: [https://agni512-hirehub-smart-document-qa.hf.space/demo](https://agni512-hirehub-smart-document-qa.hf.space/demo) - API docs: [https://agni512-hirehub-smart-document-qa.hf.space/docs](https://agni512-hirehub-smart-document-qa.hf.space/docs) - Health: [https://agni512-hirehub-smart-document-qa.hf.space/health](https://agni512-hirehub-smart-document-qa.hf.space/health) This Space runs the existing app in a single Docker container and starts: - PostgreSQL - Redis - Celery worker - FastAPI app The public entrypoints are: - `/demo` - `/docs` - `/health` Required Space secrets: - `HF_TOKEN` - `OPENAI_API_KEY` Recommended Space variables: - `OPENAI_BASE_URL=https://router.huggingface.co/v1` - `OPENAI_MODEL=openai/gpt-oss-20b` - `HF_INFERENCE_PROVIDER=auto` - `HF_EMBEDDING_MODEL=Qwen/Qwen3-Embedding-8B` - `EMBEDDING_MODEL=infgrad/Jasper-Token-Compression-600M` - `EMBEDDING_TRUST_REMOTE_CODE=true` `HF_EMBEDDING_MODEL` is the primary API-backed embedder. `EMBEDDING_MODEL` remains the local fallback model if the HF embedding API is unavailable. The generated Space bundle is created under [`build/hf-space`](./build/hf-space) by [`scripts/build_hf_space_bundle.py`](./scripts/build_hf_space_bundle.py).