Browse Source

[MNT] update _search_by_semantic_description

tags/v0.3.2
xiey 3 years ago
parent
commit
d006d2c08a
1 changed files with 3 additions and 1 deletions
  1. +3
    -1
      learnware/market/easy.py

+ 3
- 1
learnware/market/easy.py View File

@@ -306,11 +306,13 @@ class EasyMarket(BaseMarket):
) -> List[Learnware]:
user_semantic_spec = user_info.get_semantic_spec()
user_input_description = user_semantic_spec["Description"]["Values"]
learnware_semantic_spec = learnware.get_specification().get_semantic_spec()
if not user_input_description:
return []
match_learnwares = []
for learnware in learnware_list:
learnware_name = learnware.get_name()
learnware_semantic_spec = learnware.get_specification().get_semantic_spec()
learnware_name = learnware_semantic_spec['Name']['Values']
if user_input_description in learnware_name:
match_learnwares.append(learnware)
return match_learnwares


Loading…
Cancel
Save