Theivaprakasham
commited on
Commit
•
bb03dfe
1
Parent(s):
a114b97
added required dependencies
Browse files- app.py +2 -0
- requirements.txt +4 -2
app.py
CHANGED
@@ -5,6 +5,8 @@ import layoutparser as lp
|
|
5 |
from PIL import Image
|
6 |
import PIL
|
7 |
|
|
|
|
|
8 |
model = lp.Detectron2LayoutModel('lp://PubLayNet/faster_rcnn_R_50_FPN_3x/config',
|
9 |
extra_config=["MODEL.ROI_HEADS.SCORE_THRESH_TEST", 0.8],
|
10 |
label_map={0: "Text", 1: "Title", 2: "List", 3:"Table", 4:"Figure"})
|
|
|
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.Detectron2LayoutModel('lp://PubLayNet/faster_rcnn_R_50_FPN_3x/config',
|
11 |
extra_config=["MODEL.ROI_HEADS.SCORE_THRESH_TEST", 0.8],
|
12 |
label_map={0: "Text", 1: "Title", 2: "List", 3:"Table", 4:"Figure"})
|
requirements.txt
CHANGED
@@ -1,3 +1,5 @@
|
|
1 |
layoutparser
|
2 |
-
|
3 |
-
|
|
|
|
|
|
1 |
layoutparser
|
2 |
+
layoutparser[ocr]
|
3 |
+
torch
|
4 |
+
torchvision
|
5 |
+
torchaudio
|