Theivaprakasham commited on
Commit
cfb9c05
·
1 Parent(s): dd7df9a

Add layout detection app.py

Browse files
Files changed (2) hide show
  1. app.py +3 -1
  2. requirements.txt +1 -1
app.py CHANGED
@@ -5,7 +5,9 @@ import layoutparser as lp
5
  from PIL import Image
6
  import PIL
7
 
8
- os.system('pip install "git+https://github.com/facebookresearch/[email protected]#egg=detectron2" ')
 
 
9
 
10
  model = lp.AutoLayoutModel("lp://efficientdet/PubLayNet", label_map={0: "Text", 1: "Title", 2: "List", 3:"Table", 4:"Figure"})
11
 
 
5
  from PIL import Image
6
  import PIL
7
 
8
+ #os.system('pip install "git+https://github.com/facebookresearch/[email protected]#egg=detectron2" ')
9
+
10
+ #os.system("pip install opencv-python-headless== 4.5.5.62")
11
 
12
  model = lp.AutoLayoutModel("lp://efficientdet/PubLayNet", label_map={0: "Text", 1: "Title", 2: "List", 3:"Table", 4:"Figure"})
13
 
requirements.txt CHANGED
@@ -4,4 +4,4 @@ layoutparser[effdet]
4
  torch
5
  torchvision
6
  torchaudio
7
- opencv-python-headless==4.1.2.30
 
4
  torch
5
  torchvision
6
  torchaudio
7
+ opencv-python-headless== 4.5.5.62