dongyubin commited on
Commit
be69f07
·
1 Parent(s): 9ebefe7

更新prompt

Browse files
Files changed (1) hide show
  1. app.py +7 -1
app.py CHANGED
@@ -35,7 +35,13 @@ def my_inference_function(url):
35
  data = loader.load()
36
  chain = load_qa_chain(llm=llm, chain_type="stuff")
37
  # response = chain.run(input_documents=data, question="Summarize this article in a paragraph and provide a name and link")
38
- response = chain.run(input_documents=data, question="Please summarize the content of the article in 50 words in Chinese. 请用 50 个字的中文总结文章的内容")
 
 
 
 
 
 
39
  return response
40
 
41
  if __name__ == '__main__':
 
35
  data = loader.load()
36
  chain = load_qa_chain(llm=llm, chain_type="stuff")
37
  # response = chain.run(input_documents=data, question="Summarize this article in a paragraph and provide a name and link")
38
+ # Please summarize the content of the article in 50 words in Chinese.
39
+ response = chain.run(input_documents=data, question="""请用中文总结文章的内容,并以下面模版给出结果:
40
+ 《文章标题》摘要如下:
41
+ ## 一句话描述
42
+ 文章摘要内容
43
+ ## 文章略读
44
+ 文章要点""")
45
  return response
46
 
47
  if __name__ == '__main__':