JaMe76 commited on
Commit
40daba5
1 Parent(s): a10c81f

update space

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -1,11 +1,10 @@
1
  import os
2
  import importlib.metadata
3
  from os import getcwd, path, environ
4
- import deepdoctection as dd
5
 
6
 
7
  def check_additional_requirements():
8
- if not dd.detectron2_available():
9
  os.system('pip install detectron2@git+https://github.com/facebookresearch/detectron2.git')
10
  if importlib.util.find_spec("gradio") is not None:
11
  if importlib.metadata.version("gradio")!="3.4.1":
@@ -19,6 +18,7 @@ def check_additional_requirements():
19
 
20
  check_additional_requirements()
21
 
 
22
  from deepdoctection.dataflow.serialize import DataFromList
23
  import time
24
  from dd_addons.extern import PdfTextDetector, PostProcessor, get_xsl_path
 
1
  import os
2
  import importlib.metadata
3
  from os import getcwd, path, environ
 
4
 
5
 
6
  def check_additional_requirements():
7
+ if importlib.util.find_spec("detectron2") is None:
8
  os.system('pip install detectron2@git+https://github.com/facebookresearch/detectron2.git')
9
  if importlib.util.find_spec("gradio") is not None:
10
  if importlib.metadata.version("gradio")!="3.4.1":
 
18
 
19
  check_additional_requirements()
20
 
21
+ import deepdoctection as dd
22
  from deepdoctection.dataflow.serialize import DataFromList
23
  import time
24
  from dd_addons.extern import PdfTextDetector, PostProcessor, get_xsl_path