Delete paddleocr/whl/det/ch/ch_PP-OCRv4_det_infer/inference.pdiparams

#4
.gitattributes CHANGED
@@ -32,4 +32,19 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
32
  *.xz filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
- *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
32
  *.xz filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
+ *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ magic_pdf-0.8.0a1-py3-none-any.whl filter=lfs diff=lfs merge=lfs -text
37
+ magic_pdf-0.8.0a2-py3-none-any.whl filter=lfs diff=lfs merge=lfs -text
38
+ magic_pdf-0.8.0a3-py3-none-any.whl filter=lfs diff=lfs merge=lfs -text
39
+ paddleocr/whl/cls/ch_ppocr_mobile_v2.0_cls_infer/inference.pdmodel filter=lfs diff=lfs merge=lfs -text
40
+ paddleocr/whl/det/ch/ch_PP-OCRv4_det_infer/inference.pdiparams filter=lfs diff=lfs merge=lfs -text
41
+ paddleocr/whl/rec/ch/ch_PP-OCRv4_rec_infer/inference.pdiparams filter=lfs diff=lfs merge=lfs -text
42
+ magic_pdf-0.9.0a1-py3-none-any.whl filter=lfs diff=lfs merge=lfs -text
43
+ magic_pdf-0.9.0a2-py3-none-any.whl filter=lfs diff=lfs merge=lfs -text
44
+ magic_pdf-0.9.0a3-py3-none-any.whl filter=lfs diff=lfs merge=lfs -text
45
+ magic_pdf-0.9.0a4-py3-none-any.whl filter=lfs diff=lfs merge=lfs -text
46
+ magic_pdf-0.9.0a5-py3-none-any.whl filter=lfs diff=lfs merge=lfs -text
47
+ magic_pdf-0.9.0a6-py3-none-any.whl filter=lfs diff=lfs merge=lfs -text
48
+ magic_pdf-0.9.0a7-py3-none-any.whl filter=lfs diff=lfs merge=lfs -text
49
+ magic_pdf-0.9.0a8-py3-none-any.whl filter=lfs diff=lfs merge=lfs -text
50
+ magic_pdf-0.9.0a9-py3-none-any.whl filter=lfs diff=lfs merge=lfs -text
README.md CHANGED
@@ -1,20 +1,16 @@
1
  ---
2
- title: MinerU OCR
3
  emoji: 📚
4
  colorFrom: purple
5
  colorTo: blue
6
  sdk: gradio
7
- sdk_version: 6.8.0
8
  app_file: app.py
9
- pinned: true
10
  license: agpl-3.0
11
- python_version: 3.12
12
  models:
13
  - opendatalab/PDF-Extract-Kit-1.0
14
- - opendatalab/MinerU2.5-2509-1.2B
15
- thumbnail: >-
16
- https://cdn-uploads.huggingface.co/production/uploads/668f77a3b3991ac0c308a441/dsQTqtqf8SiM5oDe1FKFY.png
17
- short_description: A data extraction tool to convert PDF to Markdown and JSON
18
  ---
19
 
20
  Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
1
  ---
2
+ title: MinerU
3
  emoji: 📚
4
  colorFrom: purple
5
  colorTo: blue
6
  sdk: gradio
7
+ sdk_version: 5.7.1
8
  app_file: app.py
9
+ pinned: false
10
  license: agpl-3.0
 
11
  models:
12
  - opendatalab/PDF-Extract-Kit-1.0
13
+ - hantian/layoutreader
 
 
 
14
  ---
15
 
16
  Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
app.py CHANGED
@@ -1,40 +1,238 @@
1
  # Copyright (c) Opendatalab. All rights reserved.
2
 
 
3
  import os
4
- import json
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5
  from loguru import logger
6
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7
 
8
- if __name__ == '__main__':
9
- os.system('pip uninstall -y mineru')
10
- os.system('pip install git+https://github.com/myhloli/Magic-PDF.git@dev')
11
- os.system('pip install -U mineru_vl_utils')
12
- os.system('mineru-models-download -s huggingface -m all')
13
- # os.system('mineru-models-download -s modelscope -m all')
14
- os.environ['MINERU_MODEL_SOURCE'] = "local"
15
- os.environ['GRADIO_SSR_MODE'] = "false"
16
- os.environ['MINERU_PDF_RENDER_TIMEOUT'] = "10"
17
  try:
18
- home_dir = os.path.expanduser('~')
19
- config_file = os.path.join(home_dir, 'mineru.json')
20
- with open(config_file, 'r+') as file:
21
- config = json.load(file)
22
-
23
- delimiters = {
24
- 'display': {'left': '\\[', 'right': '\\]'},
25
- 'inline': {'left': '\\(', 'right': '\\)'}
26
- }
27
-
28
- config['latex-delimiter-config'] = delimiters
29
-
30
- if os.getenv('apikey'):
31
- config['llm-aided-config']['title_aided']['api_key'] = os.getenv('apikey')
32
- config['llm-aided-config']['title_aided']['enable'] = True
33
- config['llm-aided-config']['title_aided']['model'] = "qwen3-next-80b-a3b-instruct"
34
-
35
- file.seek(0) # 将文件指针移回文件开始位置
36
- file.truncate() # 截断文件,清除原有内容
37
- json.dump(config, file, indent=4) # 写入新内容
38
  except Exception as e:
39
  logger.exception(e)
40
- os.system('mineru-gradio --enable-api false --max-convert-pages 20 --latex-delimiters-type b --gpu-memory-utilization 0.5')
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  # Copyright (c) Opendatalab. All rights reserved.
2
 
3
+ import base64
4
  import os
5
+ import time
6
+ import zipfile
7
+ from pathlib import Path
8
+ import re
9
+ import uuid
10
+ import pymupdf
11
+
12
+ # os.system('pip install -U magic-pdf==0.10.5')
13
+ os.system('pip uninstall -y magic-pdf')
14
+ os.system('pip install git+https://github.com/opendatalab/MinerU.git@dev')
15
+
16
+ os.system('wget https://github.com/opendatalab/MinerU/raw/master/scripts/download_models_hf.py -O download_models_hf.py')
17
+ os.system('python download_models_hf.py')
18
+ os.system("sed -i 's|cpu|cuda|g' /home/user/magic-pdf.json")
19
+
20
+ os.system('cp -r paddleocr /home/user/.paddleocr')
21
+ os.system("pip install gradio-pdf==0.0.19")
22
+ from gradio_pdf import PDF
23
+
24
+ import gradio as gr
25
  from loguru import logger
26
 
27
+ from magic_pdf.libs.hash_utils import compute_sha256
28
+ from magic_pdf.rw.AbsReaderWriter import AbsReaderWriter
29
+ from magic_pdf.rw.DiskReaderWriter import DiskReaderWriter
30
+ from magic_pdf.tools.common import do_parse, prepare_env
31
+
32
+
33
+ def read_fn(path):
34
+ disk_rw = DiskReaderWriter(os.path.dirname(path))
35
+ return disk_rw.read(os.path.basename(path), AbsReaderWriter.MODE_BIN)
36
+
37
+
38
+ def parse_pdf(doc_path, output_dir, end_page_id, is_ocr, layout_mode, formula_enable, table_enable, language):
39
+ os.makedirs(output_dir, exist_ok=True)
40
+
41
+ try:
42
+ file_name = f"{str(Path(doc_path).stem)}_{time.time()}"
43
+ pdf_data = read_fn(doc_path)
44
+ if is_ocr:
45
+ parse_method = "ocr"
46
+ else:
47
+ parse_method = "auto"
48
+ local_image_dir, local_md_dir = prepare_env(output_dir, file_name, parse_method)
49
+ do_parse(
50
+ output_dir,
51
+ file_name,
52
+ pdf_data,
53
+ [],
54
+ parse_method,
55
+ False,
56
+ end_page_id=end_page_id,
57
+ layout_model=layout_mode,
58
+ formula_enable=formula_enable,
59
+ table_enable=table_enable,
60
+ lang=language,
61
+ )
62
+ return local_md_dir, file_name
63
+ except Exception as e:
64
+ logger.exception(e)
65
+
66
+
67
+ def compress_directory_to_zip(directory_path, output_zip_path):
68
+ """
69
+ 压缩指定目录到一个 ZIP 文件。
70
 
71
+ :param directory_path: 要压缩的目录路径
72
+ :param output_zip_path: 输出的 ZIP 文件路径
73
+ """
 
 
 
 
 
 
74
  try:
75
+ with zipfile.ZipFile(output_zip_path, 'w', zipfile.ZIP_DEFLATED) as zipf:
76
+
77
+ # 遍历目录中的所有文件和子目录
78
+ for root, dirs, files in os.walk(directory_path):
79
+ for file in files:
80
+ # 构建完整的文件路径
81
+ file_path = os.path.join(root, file)
82
+ # 计算相对路径
83
+ arcname = os.path.relpath(file_path, directory_path)
84
+ # 添加文件到 ZIP 文件
85
+ zipf.write(file_path, arcname)
86
+ return 0
 
 
 
 
 
 
 
 
87
  except Exception as e:
88
  logger.exception(e)
89
+ return -1
90
+
91
+
92
+ def image_to_base64(image_path):
93
+ with open(image_path, "rb") as image_file:
94
+ return base64.b64encode(image_file.read()).decode('utf-8')
95
+
96
+
97
+ def replace_image_with_base64(markdown_text, image_dir_path):
98
+ # 匹配Markdown中的图片标签
99
+ pattern = r'\!\[(?:[^\]]*)\]\(([^)]+)\)'
100
+
101
+ # 替换图片链接
102
+ def replace(match):
103
+ relative_path = match.group(1)
104
+ full_path = os.path.join(image_dir_path, relative_path)
105
+ base64_image = image_to_base64(full_path)
106
+ return f"![{relative_path}](data:image/jpeg;base64,{base64_image})"
107
+
108
+ # 应用替换
109
+ return re.sub(pattern, replace, markdown_text)
110
+
111
+
112
+ def to_markdown(file_path, end_pages, is_ocr, layout_mode, formula_enable, table_enable, language):
113
+ # 获取识别的md文件以及压缩包文件路径
114
+ local_md_dir, file_name = parse_pdf(file_path, './output', end_pages - 1, is_ocr,
115
+ layout_mode, formula_enable, table_enable, language)
116
+ archive_zip_path = os.path.join("./output", compute_sha256(local_md_dir) + ".zip")
117
+ zip_archive_success = compress_directory_to_zip(local_md_dir, archive_zip_path)
118
+ if zip_archive_success == 0:
119
+ logger.info("压缩成功")
120
+ else:
121
+ logger.error("压缩失败")
122
+ md_path = os.path.join(local_md_dir, file_name + ".md")
123
+ with open(md_path, 'r', encoding='utf-8') as f:
124
+ txt_content = f.read()
125
+ md_content = replace_image_with_base64(txt_content, local_md_dir)
126
+ # 返回转换后的PDF路径
127
+ new_pdf_path = os.path.join(local_md_dir, file_name + "_layout.pdf")
128
+
129
+ return md_content, txt_content, archive_zip_path, new_pdf_path
130
+
131
+
132
+ latex_delimiters = [{"left": "$$", "right": "$$", "display": True},
133
+ {"left": '$', "right": '$', "display": False}]
134
+
135
+
136
+ def init_model():
137
+ from magic_pdf.model.doc_analyze_by_custom_model import ModelSingleton
138
+ try:
139
+ model_manager = ModelSingleton()
140
+ txt_model = model_manager.get_model(False, False)
141
+ logger.info(f"txt_model init final")
142
+ ocr_model = model_manager.get_model(True, False)
143
+ logger.info(f"ocr_model init final")
144
+ return 0
145
+ except Exception as e:
146
+ logger.exception(e)
147
+ return -1
148
+
149
+
150
+ model_init = init_model()
151
+ logger.info(f"model_init: {model_init}")
152
+
153
+
154
+ with open("header.html", "r") as file:
155
+ header = file.read()
156
+
157
+
158
+ latin_lang = [
159
+ 'af', 'az', 'bs', 'cs', 'cy', 'da', 'de', 'es', 'et', 'fr', 'ga', 'hr',
160
+ 'hu', 'id', 'is', 'it', 'ku', 'la', 'lt', 'lv', 'mi', 'ms', 'mt', 'nl',
161
+ 'no', 'oc', 'pi', 'pl', 'pt', 'ro', 'rs_latin', 'sk', 'sl', 'sq', 'sv',
162
+ 'sw', 'tl', 'tr', 'uz', 'vi', 'french', 'german'
163
+ ]
164
+ arabic_lang = ['ar', 'fa', 'ug', 'ur']
165
+ cyrillic_lang = [
166
+ 'ru', 'rs_cyrillic', 'be', 'bg', 'uk', 'mn', 'abq', 'ady', 'kbd', 'ava',
167
+ 'dar', 'inh', 'che', 'lbe', 'lez', 'tab'
168
+ ]
169
+ devanagari_lang = [
170
+ 'hi', 'mr', 'ne', 'bh', 'mai', 'ang', 'bho', 'mah', 'sck', 'new', 'gom',
171
+ 'sa', 'bgc'
172
+ ]
173
+ other_lang = ['ch', 'en', 'korean', 'japan', 'chinese_cht', 'ta', 'te', 'ka']
174
+
175
+ all_lang = [""]
176
+ all_lang.extend([*other_lang, *latin_lang, *arabic_lang, *cyrillic_lang, *devanagari_lang])
177
+
178
+
179
+ def to_pdf(file_path):
180
+ with pymupdf.open(file_path) as f:
181
+ if f.is_pdf:
182
+ return file_path
183
+ else:
184
+ pdf_bytes = f.convert_to_pdf()
185
+ # 将pdfbytes 写入到uuid.pdf中
186
+ # 生成唯一的文件名
187
+ unique_filename = f"{uuid.uuid4()}.pdf"
188
+
189
+ # 构建完整的文件路径
190
+ tmp_file_path = os.path.join(os.path.dirname(file_path), unique_filename)
191
+
192
+ # 将字节数据写入文件
193
+ with open(tmp_file_path, 'wb') as tmp_pdf_file:
194
+ tmp_pdf_file.write(pdf_bytes)
195
+
196
+ return tmp_file_path
197
+
198
+
199
+ if __name__ == "__main__":
200
+ with gr.Blocks() as demo:
201
+ gr.HTML(header)
202
+ with gr.Row():
203
+ with gr.Column(variant='panel', scale=5):
204
+ file = gr.File(label="Please upload a PDF or image", file_types=[".pdf", ".png", ".jpeg", ".jpg"])
205
+ max_pages = gr.Slider(1, 10, 5, step=1, label="Max convert pages")
206
+ with gr.Row():
207
+ layout_mode = gr.Dropdown(["layoutlmv3", "doclayout_yolo"], label="Layout model", value="layoutlmv3")
208
+ language = gr.Dropdown(all_lang, label="Language", value="")
209
+ with gr.Row():
210
+ formula_enable = gr.Checkbox(label="Enable formula recognition", value=True)
211
+ is_ocr = gr.Checkbox(label="Force enable OCR", value=False)
212
+ table_enable = gr.Checkbox(label="Enable table recognition(test)", value=False)
213
+ with gr.Row():
214
+ change_bu = gr.Button("Convert")
215
+ clear_bu = gr.ClearButton(value="Clear")
216
+ pdf_show = PDF(label="PDF preview", interactive=True, height=800)
217
+ with gr.Accordion("Examples:"):
218
+ example_root = os.path.join(os.path.dirname(__file__), "examples")
219
+ gr.Examples(
220
+ examples=[os.path.join(example_root, _) for _ in os.listdir(example_root) if
221
+ _.endswith("pdf")],
222
+ inputs=pdf_show
223
+ )
224
+
225
+ with gr.Column(variant='panel', scale=5):
226
+ output_file = gr.File(label="convert result", interactive=False)
227
+ with gr.Tabs():
228
+ with gr.Tab("Markdown rendering"):
229
+ md = gr.Markdown(label="Markdown rendering", height=900, show_copy_button=True,
230
+ latex_delimiters=latex_delimiters, line_breaks=True)
231
+ with gr.Tab("Markdown text"):
232
+ md_text = gr.TextArea(lines=45, show_copy_button=True)
233
+ file.upload(fn=to_pdf, inputs=file, outputs=pdf_show)
234
+ change_bu.click(fn=to_markdown, inputs=[pdf_show, max_pages, is_ocr, layout_mode, formula_enable, table_enable, language],
235
+ outputs=[md, md_text, output_file, pdf_show], api_name=False, concurrency_limit=4)
236
+ clear_bu.add([file, md, pdf_show, md_text, output_file, is_ocr, table_enable, language])
237
+
238
+ demo.launch(ssr_mode=False)
header.html ADDED
@@ -0,0 +1,122 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <html>
2
+ <head>
3
+ <!-- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bulma@0.9.3/css/bulma.min.css"> -->
4
+ <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.15.4/css/all.css">
5
+ <style>
6
+ .link-block {
7
+ border: 1px solid transparent;
8
+ border-radius: 24px;
9
+ background-color: rgba(54, 54, 54, 1);
10
+ cursor: pointer !important;
11
+ }
12
+ .link-block:hover {
13
+ background-color: rgba(54, 54, 54, 0.75) !important;
14
+ cursor: pointer !important;
15
+ }
16
+ .external-link {
17
+ display: inline-flex;
18
+ align-items: center;
19
+ height: 36px;
20
+ line-height: 36px;
21
+ padding: 0 16px;
22
+ cursor: pointer !important;
23
+ }
24
+ .external-link,
25
+ .external-link:hover {
26
+ cursor: pointer !important;
27
+ }
28
+ a {
29
+ text-decoration: none;
30
+ }
31
+ </style>
32
+ </head>
33
+
34
+ <body>
35
+ <div style="
36
+ display: flex;
37
+ flex-direction: column;
38
+ justify-content: center;
39
+ align-items: center;
40
+ text-align: center;
41
+ background: linear-gradient(45deg, #007bff 0%, #0056b3 100%);
42
+ padding: 24px;
43
+ gap: 24px;
44
+ border-radius: 8px;
45
+ ">
46
+ <div style="
47
+ display: flex;
48
+ flex-direction: column;
49
+ align-items: center;
50
+ gap: 16px;
51
+ ">
52
+ <div style="display: flex; flex-direction: column; gap: 8px">
53
+ <h1 style="
54
+ font-size: 48px;
55
+ color: #fafafa;
56
+ margin: 0;
57
+ font-family: 'Trebuchet MS', 'Lucida Sans Unicode',
58
+ 'Lucida Grande', 'Lucida Sans', Arial, sans-serif;
59
+ ">
60
+ MinerU: PDF Extraction Demo
61
+ </h1>
62
+ </div>
63
+ </div>
64
+
65
+ <p style="
66
+ margin: 0;
67
+ line-height: 1.6rem;
68
+ font-size: 16px;
69
+ color: #fafafa;
70
+ opacity: 0.8;
71
+ ">
72
+ A one-stop, open-source, high-quality data extraction tool, supports
73
+ PDF/webpage/e-book extraction.<br>
74
+ </p>
75
+ <style>
76
+ .link-block {
77
+ display: inline-block;
78
+ }
79
+ .link-block + .link-block {
80
+ margin-left: 20px;
81
+ }
82
+ </style>
83
+
84
+ <div class="column has-text-centered">
85
+ <div class="publication-links">
86
+ <!-- Code Link. -->
87
+ <span class="link-block">
88
+ <a href="https://github.com/opendatalab/MinerU" class="external-link button is-normal is-rounded is-dark" style="text-decoration: none; cursor: pointer">
89
+ <span class="icon" style="margin-right: 4px">
90
+ <i class="fab fa-github" style="color: white; margin-right: 4px"></i>
91
+ </span>
92
+ <span style="color: white">Code</span>
93
+ </a>
94
+ </span>
95
+
96
+ <!-- arXiv Link. -->
97
+ <span class="link-block">
98
+ <a href="https://arxiv.org/abs/2409.18839" class="external-link button is-normal is-rounded is-dark" style="text-decoration: none; cursor: pointer">
99
+ <span class="icon" style="margin-right: 8px">
100
+ <i class="fas fa-file" style="color: white"></i>
101
+ </span>
102
+ <span style="color: white">Paper</span>
103
+ </a>
104
+ </span>
105
+
106
+ <!-- Homepage Link. -->
107
+ <span class="link-block">
108
+ <a href="https://opendatalab.com/" class="external-link button is-normal is-rounded is-dark" style="text-decoration: none; cursor: pointer">
109
+ <span class="icon" style="margin-right: 8px">
110
+ <i class="fas fa-globe" style="color: white"></i>
111
+ </span>
112
+ <span style="color: white">Homepage</span>
113
+ </a>
114
+ </span>
115
+ </div>
116
+ </div>
117
+
118
+ <!-- New Demo Links -->
119
+ </div>
120
+
121
+
122
+ </body></html>
packages.txt DELETED
@@ -1,2 +0,0 @@
1
- fonts-noto-core
2
- fonts-noto-cjk
 
 
 
paddleocr/whl/cls/ch_ppocr_mobile_v2.0_cls_infer/inference.pdiparams ADDED
Binary file (540 kB). View file
 
paddleocr/whl/cls/ch_ppocr_mobile_v2.0_cls_infer/inference.pdiparams.info ADDED
Binary file (18.5 kB). View file
 
paddleocr/whl/det/ch/ch_PP-OCRv4_det_infer/inference.pdiparams.info ADDED
Binary file (23.6 kB). View file
 
paddleocr/whl/det/ch/ch_PP-OCRv4_det_infer/inference.pdmodel ADDED
Binary file (166 kB). View file
 
paddleocr/whl/rec/ch/ch_PP-OCRv4_rec_infer/inference.pdiparams.info ADDED
Binary file (30.6 kB). View file
 
paddleocr/whl/rec/ch/ch_PP-OCRv4_rec_infer/inference.pdmodel ADDED
Binary file (169 kB). View file
 
requirements.txt CHANGED
@@ -1,2 +1,23 @@
1
- mineru[pipeline,vlm,api,vllm]>=2.7.6
2
- gradio-pdf>=0.0.22
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ boto3>=1.28.43
2
+ Brotli>=1.1.0
3
+ click>=8.1.7
4
+ PyMuPDF>=1.24.9
5
+ loguru>=0.6.0
6
+ numpy>=1.21.6,<2.0.0
7
+ fast-langdetect==0.2.0
8
+ scikit-learn>=1.0.2
9
+ unimernet==0.2.1
10
+ doclayout_yolo==0.0.2
11
+ matplotlib
12
+ ultralytics
13
+ paddleocr==2.7.3
14
+ paddlepaddle-gpu @ https://paddle-whl.bj.bcebos.com/stable/cu118/paddlepaddle-gpu/paddlepaddle_gpu-3.0.0b1-cp310-cp310-linux_x86_64.whl
15
+ pypandoc
16
+ struct-eqtable==0.3.2
17
+ detectron2 @ https://wheels-1251341229.cos.ap-shanghai.myqcloud.com/assets/whl/detectron2/detectron2-0.6-cp310-cp310-linux_x86_64.whl
18
+ magic-pdf>=0.9.2
19
+ rapid-table
20
+ rapidocr-paddle
21
+ gradio
22
+ huggingface_hub
23
+ gradio-pdf