Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
周伟奇
/
bmw-ocr
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Network
Create a new issue
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
9a98ad33
authored
2025-09-22 11:18:51 +0800
by
冯轩
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
MOD:减少日志
1 parent
6549cd76
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
src/apps/doc/management/commands/ocr_process.py
src/apps/doc/management/commands/ocr_process.py
View file @
9a98ad3
...
...
@@ -1814,7 +1814,7 @@ class Command(BaseCommand, LoggerMixin):
json_data_1
[
'text_list'
]
=
text_list
start_time
=
time
.
time
()
self
.
online_log
.
info
(
'{0} [ocr_1 api] [img={1}] [json_data_1={2}]'
.
format
(
self
.
log_base
,
img_path
,
json_data_1
))
#
self.online_log.info('{0} [ocr_1 api] [img={1}] [json_data_1={2}]'.format(self.log_base, img_path, json_data_1))
ocr_1_response
=
requests
.
post
(
url
,
json
=
json_data_1
)
if
ocr_1_response
.
status_code
!=
200
:
raise
OCR1Exception
(
'ocr_1 status code: {0}'
.
format
(
ocr_1_response
.
status_code
))
...
...
@@ -1825,7 +1825,7 @@ class Command(BaseCommand, LoggerMixin):
else
:
self
.
online_log
.
info
(
'{0} [ocr_1 start] [img={1}] [url={2}]'
.
format
(
self
.
log_base
,
img_path
,
url
))
ocr_1_res
=
ocr_1_response
.
json
()
self
.
online_log
.
info
(
'{0} [ocr_1 api res] [img={1}] [ocr_1_res={2}]'
.
format
(
self
.
log_base
,
img_path
,
ocr_1_res
))
#
self.online_log.info('{0} [ocr_1 api res] [img={1}] [ocr_1_res={2}]'.format(self.log_base, img_path, ocr_1_res))
end_time
=
time
.
time
()
speed_time
=
int
(
end_time
-
start_time
)
self
.
online_log
.
info
(
'{0} [ocr_1 success] [img={1}] [url={2}] [speed_time={3}]'
.
format
(
...
...
Write
Preview
Styling with
Markdown
is supported
Attach a file
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 post a comment