SV08
4 years ago
| 7 | 7 | 参数请放到params字典中,我们会自动解析该变量。 |
| 8 | 8 | """ |
| 9 | 9 | |
| 10 | # param1 = conf['param1'] # value_type: str # description: some description | |
| 11 | # start_words = conf['start_words'] #诗歌开始 | |
| 12 | # prefix_words = conf['prefix_words'] #诗歌语境 | |
| 13 | # max_gen_len = conf['max_gen_len'] #诗歌最大长度 | |
| 14 | # # add your code | |
| 15 | # if __name__ == '__main__': | |
| 16 | # cnf = {start_words,prefix_words,max_gen_len} | |
| 17 | # result = main.gen(**cnf) | |
| 18 | # result = ''.json(result) | |
| 19 | # return {'result': result} | |
| 20 | ||
| 21 | 10 | if __name__ == '__main__': |
| 22 | 11 | import main |
| 23 | # conf={'start_words':"雨",'prefix_words':"天晴", 'max_gen_len':100} | |
| 24 | 12 | start_words = conf['start_words'] #诗歌开始 |
| 25 | 13 | prefix_words = conf['prefix_words'] #诗歌语境 |
| 26 | 14 | max_gen_len = conf['max_gen_len'] #诗歌最大长度 |
| 30 | 18 | "start_words" : start_words # 诗歌开始 |
| 31 | 19 | } |
| 32 | 20 | result = main.gen(**cof) |
| 33 | result = ''.join(result) | |
| 34 | # print(result) | |
| 35 | 21 | return {'ret1':result} |
| 36 | 22 | ⏎ |