taprosoft
commited on
Commit
·
a2b4d23
1
Parent(s):
eda147a
feat: enable formula for MinerU
Browse files- app.py +1 -2
- backends/mineru.py +1 -2
- requirements.txt +2 -0
app.py
CHANGED
@@ -2,9 +2,8 @@ import os
|
|
2 |
import zipfile
|
3 |
from collections import defaultdict
|
4 |
|
5 |
-
from utils import
|
6 |
|
7 |
-
fix_problematic_imports() # noqa
|
8 |
prepare_env_mineru() # noqa
|
9 |
|
10 |
|
|
|
2 |
import zipfile
|
3 |
from collections import defaultdict
|
4 |
|
5 |
+
from utils import prepare_env_mineru
|
6 |
|
|
|
7 |
prepare_env_mineru() # noqa
|
8 |
|
9 |
|
backends/mineru.py
CHANGED
@@ -52,8 +52,7 @@ def do_process_mineru(input_path, output_dir):
|
|
52 |
f_dump_orig_pdf=False,
|
53 |
f_draw_layout_bbox=ENABLE_DEBUG_MODE,
|
54 |
f_draw_char_bbox=False,
|
55 |
-
formula_enable=
|
56 |
-
# disable formula recognition due to dependency issue
|
57 |
table_enable=True,
|
58 |
)
|
59 |
return local_md_dir, file_name
|
|
|
52 |
f_dump_orig_pdf=False,
|
53 |
f_draw_layout_bbox=ENABLE_DEBUG_MODE,
|
54 |
f_draw_char_bbox=False,
|
55 |
+
formula_enable=True,
|
|
|
56 |
table_enable=True,
|
57 |
)
|
58 |
return local_md_dir, file_name
|
requirements.txt
CHANGED
@@ -20,3 +20,5 @@ sycamore-ai[local-inference]
|
|
20 |
img2table
|
21 |
gmft
|
22 |
opencv-contrib-python
|
|
|
|
|
|
20 |
img2table
|
21 |
gmft
|
22 |
opencv-contrib-python
|
23 |
+
unimernet==0.2.3
|
24 |
+
transformers==4.49.0
|