664816b
LMonan 3 years ago
3 changed file(s) with 14 addition(s) and 20 deletion(s). Raw diff Collapse all Expand all
77 value_type: str
88 description: '祈祷'
99 output:
10 origin_hexagram:
11 name: origin_hexagram
12 value_type: str
13 description: '本卦'
14 support_hexagram:
15 name: support_hexagram
16 value_type: str
17 description: '变卦'
1018 turn_symbol_desc:
1119 name: turn_symbol_desc
1220 value_type: str
0 from yi import YiProgram
0 import y1
11
22 def handle(conf):
33 """
99 参数请放到params字典中,我们会自动解析该变量。
1010 """
1111
12 wish = conf['wish'] # value_type: str # description: some description
12 things = conf['things'] # value_type: str # description: some description
1313 pray = conf['pray']
14
15 obj = YiProgram()
16 turn_symbol_desc, main_indicate, support_indicate = obj.predict(wish, pray)
17
18 return {
19 'turn_symbol_desc': turn_symbol_desc,
20 'main_indicate': main_indicate,
21 'support_indicate': support_indicate
22 }
23
24 if __name__ == '__main__':
25 conf = {
26 'wish': '恋爱',
27 'pray': '找到对象',
28 }
29 results = handle(conf)
30 print(results)
14
15 # add your code
16 return {'ret1': 'cat'}
3117
184184 support_hexagram_dict_key = self._get_hexagram_dict_key(support_hexagram)
185185 turn_symbol_desc, main_indicate, support_indicate = self._parser_hexagram(origin_hexagram, support_hexagram)
186186
187 return turn_symbol_desc, main_indicate, support_indicate
187 return origin_hexagram, support_hexagram, turn_symbol_desc, main_indicate, support_indicate
188188
189189
190190 if __name__ == "__main__":