NicolasGaudemet commited on
Commit
94e0df5
1 Parent(s): 537b5c2

Update summarizer_app.py

Browse files
Files changed (1) hide show
  1. summarizer_app.py +3 -3
summarizer_app.py CHANGED
@@ -31,11 +31,11 @@ def summarize_text(text_to_summarize, llm):
31
  print(len(docs))
32
 
33
  #résumé
34
- prompt_template = """Write a summary of the following, in the langage of the original text, in approximately {taille} tokens:
35
  {text}
36
  SUMMARY:"""
37
- summary_langage_prompt = PromptTemplate(template=prompt_template, input_variables=['text', 'taille'])
38
- summary_langage_prompt.format(taille=f"{summary_length}")
39
  chain = load_summarize_chain(llm, chain_type="map_reduce", return_intermediate_steps=True, map_prompt=summary_langage_prompt)
40
  steps = chain({"input_documents": docs}, return_only_outputs=True)
41
 
 
31
  print(len(docs))
32
 
33
  #résumé
34
+ prompt_template = """Write a summary of the following, as long as possible in your context maximum size, in the langage of the original text:
35
  {text}
36
  SUMMARY:"""
37
+ summary_langage_prompt = PromptTemplate(template=prompt_template, input_variables=['text'])
38
+ #summary_langage_prompt.format(taille=f"{summary_length}")
39
  chain = load_summarize_chain(llm, chain_type="map_reduce", return_intermediate_steps=True, map_prompt=summary_langage_prompt)
40
  steps = chain({"input_documents": docs}, return_only_outputs=True)
41