FastAPI microservice wrapping ByteDance/Dolphin-v2 (Qwen2.5-VL-3B base) for structured document extraction. Exposes POST /extract and GET /health. Maps Dolphin's 21 element types to cf-core's 7-type canonical schema. Services: cf-text /extract, /health Env vars: CF_DOCUVISION_MODEL, CF_DOCUVISION_DEVICE, CF_DOCUVISION_PORT GPU: 8GB+ VRAM required for Dolphin-v2; CPU fallback available but very slow.
15 lines
568 B
Text
15 lines
568 B
Text
# cf-docuvision environment — copy to .env and fill in values
|
|
|
|
# Model to load. Default: ByteDance/Dolphin-v2 (downloaded from HuggingFace on first run).
|
|
# Set to a local path to skip the download: /Library/Assets/LLM/dolphin-v2/
|
|
CF_DOCUVISION_MODEL=ByteDance/Dolphin-v2
|
|
|
|
# Compute device. "auto" detects CUDA if available, falls back to CPU.
|
|
# CPU is very slow for Dolphin-v2 — 8GB+ VRAM GPU strongly recommended.
|
|
CF_DOCUVISION_DEVICE=auto
|
|
|
|
# Service port (default matches CF_DOCUVISION_URL default in cf-core)
|
|
CF_DOCUVISION_PORT=8003
|
|
|
|
# Log level
|
|
LOG_LEVEL=INFO
|