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
ecd7f8bc
Commit
ecd7f8bc
authored
Nov 13, 2024
by
zhougaofeng
Browse files
Update ocr_vllm_client.py
parent
935d07d6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
magic_pdf/dict2md/ocr_vllm_client.py
magic_pdf/dict2md/ocr_vllm_client.py
+2
-2
No files found.
magic_pdf/dict2md/ocr_vllm_client.py
View file @
ecd7f8bc
...
@@ -108,7 +108,7 @@ def unparse_text(parsed_text):
...
@@ -108,7 +108,7 @@ def unparse_text(parsed_text):
return
unparsed_text
return
unparsed_text
def
compress_image
(
image_path
,
max_size
=
(
512
,
512
)):
def
compress_image
(
image_path
,
max_size
=
(
2048
,
2048
)):
img
=
Image
.
open
(
image_path
)
img
=
Image
.
open
(
image_path
)
width
,
height
=
img
.
size
width
,
height
=
img
.
size
aspect_ratio
=
width
/
height
aspect_ratio
=
width
/
height
...
@@ -188,4 +188,4 @@ def main():
...
@@ -188,4 +188,4 @@ def main():
if
__name__
==
"__main__"
:
if
__name__
==
"__main__"
:
main
()
main
()
\ No newline at end of file
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