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
1e8a56a1
authored
Jun 03, 2020
by
lichenggang
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
format
parent
c815971e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
6 deletions
classify_server.py
predict/base_handler.py
predict/dict_predict.py
classify_server.py
View file @
1e8a56a1
...
...
@@ -46,7 +46,7 @@ if __name__ == '__main__':
# data = read_from_excel('DZ0901_V1.4_BOM.xlsx', 'DZ0901_V1.3BOM清单')
# print(data)
# print(Classify().fac_test_predic(data))
for
i
in
range
(
65
,
91
):
print
(
chr
(
i
))
#
for i in range(65, 91):
#
print(chr(i))
predict/base_handler.py
View file @
1e8a56a1
...
...
@@ -134,9 +134,8 @@ class BasePredictor:
return
li_sort
[
0
][
0
]
@classmethod
def
get_comprehensive_res
(
self
,
pre_std_result
,
model_std_result
):
print
(
'表头预测结果'
,
pre_std_result
)
print
(
'模型预测结果'
,
model_std_result
)
def
get_comprehensive_res
(
self
,
head_std_result
,
model_std_result
):
vote_count
=
{
"类别"
:
[],
"参数"
:
[],
...
...
@@ -144,7 +143,7 @@ class BasePredictor:
"数量"
:
[],
"品牌"
:
[]
}
for
k
,
v
in
pre
_std_result
.
items
():
for
k
,
v
in
head
_std_result
.
items
():
vote_count
[
v
]
.
append
(
k
)
for
k
,
v
in
model_std_result
.
items
():
...
...
predict/dict_predict.py
View file @
1e8a56a1
...
...
@@ -143,6 +143,8 @@ class DicPredict(BasePredictor):
if
predict_type
==
'all'
:
head_id_res
=
self
.
head_predict
(
dic_data
)
model_id_res
=
self
.
model_predict
(
dic_data
)
print
(
'表头预测结果'
,
head_id_res
)
print
(
'模型预测结果'
,
model_id_res
)
# 表头预测和模型预测最后返回的数据进行综合处理
head_std_result
=
head_id_res
.
get
(
'std_result'
)
...
...
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