JaMe76 commited on
Commit
6c71924
1 Parent(s): 4769339

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -3
app.py CHANGED
@@ -1,15 +1,18 @@
1
  import os
2
  os.system('pip install detectron2 -f https://dl.fbaipublicfiles.com/detectron2/wheels/cu102/torch1.9/index.html')
3
 
4
- from deepdoctection.dataflow import DataFromList
5
- from deepdoctection import get_dd_analyzer
6
  import deepdoctection as dd
 
 
 
 
 
7
  import gradio as gr
8
 
9
  _DD_ONE = "deepdoctection/configs/conf_dd_one.yaml"
10
  _TESSERACT = "deepdoctection/configs/conf_tesseract.yaml"
11
 
12
- dd.ModelCatalog.register("layout/model_final_inf_only.pt",dd.ModelProfile(
13
  name="layout/model_final_inf_only.pt",
14
  description="Detectron2 layout detection model trained on private datasets",
15
  config="dd/d2/layout/CASCADE_RCNN_R_50_FPN_GN.yaml",
 
1
  import os
2
  os.system('pip install detectron2 -f https://dl.fbaipublicfiles.com/detectron2/wheels/cu102/torch1.9/index.html')
3
 
 
 
4
  import deepdoctection as dd
5
+
6
+ from deepdoctection.extern.model import ModelProfile
7
+ from deepdoctection.analyzer.dd import build_analyzer, _auto_select_lib_and_device, _maybe_copy_config_to_cache
8
+ from deepdoctection.utils.metacfg import set_config_by_yaml
9
+
10
  import gradio as gr
11
 
12
  _DD_ONE = "deepdoctection/configs/conf_dd_one.yaml"
13
  _TESSERACT = "deepdoctection/configs/conf_tesseract.yaml"
14
 
15
+ dd.ModelCatalog.register("layout/model_final_inf_only.pt",ModelProfile(
16
  name="layout/model_final_inf_only.pt",
17
  description="Detectron2 layout detection model trained on private datasets",
18
  config="dd/d2/layout/CASCADE_RCNN_R_50_FPN_GN.yaml",