aichina commited on
Commit
42f8b47
1 Parent(s): 17b56f6
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -51,13 +51,13 @@ def convert(res,openai_key):
51
  answer = ''
52
  for txt_line in split_list(content,20):
53
  txt_line_content = '\n'.join(txt_line)
54
- prompt = f"将下面的内容,总结10条要点出来,\n{txt_line_content}"
55
  open_ai_res = create(prompt,openai_key)
56
- answer += open_ai_res['choices'][0]['text']
57
  except Exception as e:
58
  print('open ai api error',e)
59
 
60
- res_content = f'音频内容:\n{auido_txt}\nGPT3总结的要点:\n{answer}'
61
 
62
  return res_content
63
 
 
51
  answer = ''
52
  for txt_line in split_list(content,20):
53
  txt_line_content = '\n'.join(txt_line)
54
+ prompt = f"将下面的内容使用简体中文总结5条要点出来:\n\n{txt_line_content}"
55
  open_ai_res = create(prompt,openai_key)
56
+ answer += prompt + '\n GPT3:\n' + open_ai_res['choices'][0]['text']
57
  except Exception as e:
58
  print('open ai api error',e)
59
 
60
+ res_content = f'{answer}'
61
 
62
  return res_content
63