diff --git a/app_spec.yml b/app_spec.yml index bc73373..fcb0152 100644 --- a/app_spec.yml +++ b/app_spec.yml @@ -8,6 +8,14 @@ value_type: str description: '祈祷' output: + origin_hexagram: + name: origin_hexagram + value_type: str + description: '本卦' + support_hexagram: + name: support_hexagram + value_type: str + description: '变卦' turn_symbol_desc: name: turn_symbol_desc value_type: str diff --git a/handler.py b/handler.py index f3f7fa4..22507d1 100644 --- a/handler.py +++ b/handler.py @@ -1,4 +1,4 @@ -from yi import YiProgram +import y1 def handle(conf): """ @@ -10,23 +10,9 @@ 参数请放到params字典中,我们会自动解析该变量。 """ - wish = conf['wish'] # value_type: str # description: some description + things = conf['things'] # value_type: str # description: some description pray = conf['pray'] - - obj = YiProgram() - turn_symbol_desc, main_indicate, support_indicate = obj.predict(wish, pray) - - return { - 'turn_symbol_desc': turn_symbol_desc, - 'main_indicate': main_indicate, - 'support_indicate': support_indicate - } - -if __name__ == '__main__': - conf = { - 'wish': '恋爱', - 'pray': '找到对象', - } - results = handle(conf) - print(results) + + # add your code + return {'ret1': 'cat'} diff --git a/yi.py b/yi.py index 9590517..a4a2e04 100644 --- a/yi.py +++ b/yi.py @@ -185,7 +185,7 @@ support_hexagram_dict_key = self._get_hexagram_dict_key(support_hexagram) turn_symbol_desc, main_indicate, support_indicate = self._parser_hexagram(origin_hexagram, support_hexagram) - return turn_symbol_desc, main_indicate, support_indicate + return origin_hexagram, support_hexagram, turn_symbol_desc, main_indicate, support_indicate if __name__ == "__main__":