Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
lichenggang
/
bom_identify
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
e75b7476
authored
Jun 11, 2020
by
lichenggang
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
优化识别参数
parent
7756c9be
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
1 deletions
classify_server.py
http_server.py
predict/base_handler.py
classify_server.py
View file @
e75b7476
...
...
@@ -41,6 +41,7 @@ class Classify(classify_pb2_grpc.classifyServicer):
'status'
:
0
,
'err_msg'
:
err_msg
}
bom_log
.
info
(
f
'返回结果: '
+
str
(
res
))
return
classify_pb2
.
ClassifyReply
(
message
=
'result {msg}'
.
format
(
msg
=
res
))
def
fac_test_predic
(
self
,
data
):
...
...
http_server.py
View file @
e75b7476
...
...
@@ -61,6 +61,7 @@ class DictHandler(BaseHandler):
'status'
:
0
,
'err_msg'
:
err_msg
}
bom_log
.
info
(
f
'返回结果: '
+
str
(
res
))
self
.
write
(
res
)
...
...
predict/base_handler.py
View file @
e75b7476
...
...
@@ -205,7 +205,7 @@ class BasePredictor:
count
=
0
for
i
in
data
:
for
feature
in
feature_li
:
if
feature
in
str
(
i
)
.
strip
():
if
feature
in
str
(
i
)
.
strip
()
.
lower
()
:
count
+=
1
break
return
round
(
count
/
len
(
data
),
3
)
...
...
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