File size: 716 Bytes
087643a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
---
title: Document Layout Detection
emoji: 📄
colorFrom: blue
colorTo: gray
sdk: gradio
app_file: gradio_app.py
pinned: false
---

# Constrained Document Layout Detection

RT-DETR fine-tuned on DocLayNet, plus a hand-written reasoning layer for
natural-language questions about a page's layout.

Full source, training scripts, and the FastAPI API this demo shares its
code with: see the main repo.

## Space secrets needed

- `GROQ_API_KEY` - for the Ask tab's reasoning layer
- `MODEL_URL` - direct download link for the trained weights (e.g. a
  GitHub Release asset). Downloaded automatically on first run if
  `MODEL_PATH` doesn't already exist - no need to push the weights file
  into the Space's git repo.