Chan-Y commited on
Commit
a6ce7fc
1 Parent(s): b9c9dac

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -9
app.py CHANGED
@@ -42,16 +42,12 @@ def summarize(file, n_words):
42
  chunks = text_splitter.create_documents([text])
43
  n_words = n_words
44
  template = '''
45
- Your task is to summarize a long text into a concise summary of a specific number of words.
46
-
47
- The summary you generate must be very detailed.
48
-
49
- Before writing your final summary, first break down the key points of the text in a <scratchpad>. Identify the most important information that should be included in a summary of the specified length.
50
-
51
- Then, write a summary that captures the core ideas and key details of the text. Start with an introductory sentence and then concisely summarize the main points in a logical order. Make sure to stay within the {{N_WORDS}} word limit.
52
-
53
  Here is the long text to summarize:
54
- Text:
 
55
  {TEXT}
56
  '''
57
  prompt = PromptTemplate(
 
42
  chunks = text_splitter.create_documents([text])
43
  n_words = n_words
44
  template = '''
45
+ Your task is to summarize a long text into a detailed summary.
46
+ Start with an introductory sentence and then summarize the main points in a logical order, ensuring the summary is very detailed.
47
+
 
 
 
 
 
48
  Here is the long text to summarize:
49
+
50
+ Text:
51
  {TEXT}
52
  '''
53
  prompt = PromptTemplate(