RAP_DocLayout_DetectionD / .env.example
RISHIVEL's picture
space deploy: fix zerogpu pickling
087643a
Raw History Blame Contribute Delete
1.2 kB
# The reasoning layer in app/reasoning/ calls Groq directly through their
# plain SDK. No agentic framework is involved - see requirements.txt and
# the compliance note in the README.
GROQ_API_KEY=gsk_your_key_here
# Two models, because the two calls are doing different jobs.
#
# The router is a classification problem with a fixed output schema, so I
# want the small fast model and I pin the output with strict json_schema.
# Synthesis is open-ended writing, so the larger model earns its latency.
# Both support Groq's strict structured outputs (constrained decoding).
GROQ_ROUTER_MODEL=openai/gpt-oss-20b
GROQ_SYNTHESIS_MODEL=openai/gpt-oss-120b
# Where the fine-tuned RT-DETR weights live. See README for the download link.
MODEL_PATH=./weights/best.pt
# Optional: if MODEL_PATH doesn't exist, download it from here first. Set
# this on a fresh Space/container instead of manually copying the weights
# file in every time.
# MODEL_URL=https://github.com/RISHIVELS/doc_layout_detection/releases/download/weights-v1/best.pt
# Reject uploads larger than this. Document scans are rarely above a few MB,
# so this is generous and still stops someone posting a 2 GB file at the API.
MAX_UPLOAD_MB=10