Chan-Y commited on
Commit
d3aa346
·
verified ·
1 Parent(s): 8d26000

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -34,16 +34,16 @@ def summarize(file, n_words):
34
  text = f.read()
35
 
36
  template = '''
37
- Please carefully read the following document:
38
 
39
  <document>
40
  {TEXT}
41
  </document>
42
 
43
- After reading through the document, detect the language, identify the key points and main ideas covered in the text. Organize these key points into a concise bulleted list that summarizes the essential information from the document. The summary should have a maximum of 10 bullet points.
44
- The final summary MUST be in the language you detected.
45
- Your goal is to be comprehensive in capturing the core content of the document, while also being concise in how you express each summary point. Omit minor details and focus on the central themes and important facts.
46
- '''
47
 
48
  prompt = PromptTemplate(
49
  template=template,
 
34
  text = f.read()
35
 
36
  template = '''
37
+ Please carefully read the following document:
38
 
39
  <document>
40
  {TEXT}
41
  </document>
42
 
43
+ After reading through the document, identify the language, and pinpoint the key points and main ideas covered in the text. Organize these key points into a concise bulleted list that summarizes the essential information from the document. The summary should consist of a maximum of 10 bullet points.
44
+ Ensure that the final summary is in the language you identified from the document.
45
+ Your goal is to comprehensively capture the core content of the document while expressing each summary point succinctly. Omit minor details and focus on central themes and important facts.
46
+ '''
47
 
48
  prompt = PromptTemplate(
49
  template=template,