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
7b3cb3b2
Commit
7b3cb3b2
authored
Nov 13, 2024
by
zhougaofeng
Browse files
Update cut_image.py
parent
55889803
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
magic_pdf/pre_proc/cut_image.py
magic_pdf/pre_proc/cut_image.py
+1
-1
No files found.
magic_pdf/pre_proc/cut_image.py
View file @
7b3cb3b2
...
...
@@ -22,7 +22,7 @@ def ocr_image(image_path):
txt
=
os
.
getpid
()
# global client
#logger.info(f'image_path:{image_path}')
generated_text
=
f
'--【
{
txt
}
】--
\n
'
+
client
.
predict
(
image_path
,
text
)
generated_text
=
client
.
predict
(
image_path
,
text
)
end
=
time
.
time
()
logger
.
info
(
f
'qwen解析
{
image_path
}
表格的内容为:
{
generated_text
}
,耗时为:
{
end
-
start
}
'
)
return
generated_text
...
...
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