enpaiva commited on
Commit
a092a2b
·
verified ·
1 Parent(s): 267abd0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -7
app.py CHANGED
@@ -19,23 +19,23 @@ device = 'cuda' if torch.cuda.is_available() else 'cpu'
19
 
20
  # == Model configurations ==
21
  MODELS = {
22
- "Egret XLarge": {
23
  "path": "ds4sd/docling-layout-egret-xlarge",
24
  "model_class": DFineForObjectDetection
25
  },
26
- "Egret Large": {
27
  "path": "ds4sd/docling-layout-egret-large",
28
  "model_class": DFineForObjectDetection
29
  },
30
- "Egret Medium": {
31
  "path": "ds4sd/docling-layout-egret-medium",
32
  "model_class": DFineForObjectDetection
33
  },
34
- "Heron 101": {
35
  "path": "ds4sd/docling-layout-heron-101",
36
  "model_class": RTDetrV2ForObjectDetection
37
  },
38
- "Heron": {
39
  "path": "ds4sd/docling-layout-heron",
40
  "model_class": RTDetrV2ForObjectDetection
41
  }
@@ -332,7 +332,7 @@ if __name__ == "__main__":
332
  gr.HTML("""
333
  <div style='text-align: center; padding: 20px; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; border-radius: 12px; margin-bottom: 20px;'>
334
  <h1 style='margin: 0; font-size: 2.5em;'>🔍 Document Layout Analysis</h1>
335
- <p style='margin: 8px 0 0 0; font-size: 1.1em; opacity: 0.9;'>Advanced document structure detection</p>
336
  </div>
337
  """)
338
 
@@ -355,7 +355,7 @@ if __name__ == "__main__":
355
  # 2. Model Selection (second, without buttons)
356
  model_dropdown = gr.Dropdown(
357
  choices=list(MODELS.keys()),
358
- value="Egret XLarge",
359
  label="AI Model",
360
  info="Model will be loaded automatically",
361
  interactive=True
 
19
 
20
  # == Model configurations ==
21
  MODELS = {
22
+ "Docling Layout Egret XLarge": {
23
  "path": "ds4sd/docling-layout-egret-xlarge",
24
  "model_class": DFineForObjectDetection
25
  },
26
+ "Docling Layout Egret Large": {
27
  "path": "ds4sd/docling-layout-egret-large",
28
  "model_class": DFineForObjectDetection
29
  },
30
+ "Docling Layout Egret Medium": {
31
  "path": "ds4sd/docling-layout-egret-medium",
32
  "model_class": DFineForObjectDetection
33
  },
34
+ "Docling Layout Heron 101": {
35
  "path": "ds4sd/docling-layout-heron-101",
36
  "model_class": RTDetrV2ForObjectDetection
37
  },
38
+ "Docling Layout Heron": {
39
  "path": "ds4sd/docling-layout-heron",
40
  "model_class": RTDetrV2ForObjectDetection
41
  }
 
332
  gr.HTML("""
333
  <div style='text-align: center; padding: 20px; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; border-radius: 12px; margin-bottom: 20px;'>
334
  <h1 style='margin: 0; font-size: 2.5em;'>🔍 Document Layout Analysis</h1>
335
+ <p style='margin: 8px 0 0 0; font-size: 1.1em; opacity: 0.9;'>Advanced document structure detection with Docling models </p>
336
  </div>
337
  """)
338
 
 
355
  # 2. Model Selection (second, without buttons)
356
  model_dropdown = gr.Dropdown(
357
  choices=list(MODELS.keys()),
358
+ value="Docling Layout Egret XLarge",
359
  label="AI Model",
360
  info="Model will be loaded automatically",
361
  interactive=True