Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
zhougaofeng
magic_pdf
Commits
8b230796
Commit
8b230796
authored
Oct 25, 2024
by
zhougaofeng
Browse files
Update UNIPipe.py
parent
5513a575
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
magic_pdf/pipe/UNIPipe.py
magic_pdf/pipe/UNIPipe.py
+3
-3
No files found.
magic_pdf/pipe/UNIPipe.py
View file @
8b230796
...
@@ -29,12 +29,12 @@ class UNIPipe(AbsPipe):
...
@@ -29,12 +29,12 @@ class UNIPipe(AbsPipe):
# logger.info('暂时强制使用ocr pdf')
# logger.info('暂时强制使用ocr pdf')
self
.
pdf_type
=
self
.
PIP_OCR
self
.
pdf_type
=
self
.
PIP_OCR
def
pipe_analyze
(
self
):
def
pipe_analyze
(
self
,
model
):
if
self
.
pdf_type
==
self
.
PIP_TXT
:
if
self
.
pdf_type
==
self
.
PIP_TXT
:
self
.
model_list
=
doc_analyze
(
self
.
pdf_bytes
,
ocr
=
True
,
self
.
model_list
=
doc_analyze
(
model
,
self
.
pdf_bytes
,
ocr
=
True
,
start_page_id
=
self
.
start_page_id
,
end_page_id
=
self
.
end_page_id
)
start_page_id
=
self
.
start_page_id
,
end_page_id
=
self
.
end_page_id
)
elif
self
.
pdf_type
==
self
.
PIP_OCR
:
elif
self
.
pdf_type
==
self
.
PIP_OCR
:
self
.
model_list
=
doc_analyze
(
self
.
pdf_bytes
,
ocr
=
True
,
self
.
model_list
=
doc_analyze
(
model
,
self
.
pdf_bytes
,
ocr
=
True
,
start_page_id
=
self
.
start_page_id
,
end_page_id
=
self
.
end_page_id
)
start_page_id
=
self
.
start_page_id
,
end_page_id
=
self
.
end_page_id
)
def
pipe_parse
(
self
):
def
pipe_parse
(
self
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment