NicolasGaudemet commited on
Commit
77feb10
1 Parent(s): f6a259e

Update summarizer_app.py

Browse files
Files changed (1) hide show
  1. summarizer_app.py +2 -2
summarizer_app.py CHANGED
@@ -30,9 +30,9 @@ def summarize_text(text_to_summarize, llm):
30
 
31
  #résumé
32
  prompt_template = """Write a summary of the following, in the langage of the original text:
33
- {text_to_summarize}
34
  SUMMARY:"""
35
- summary_langage_prompt = PromptTemplate(template=prompt_template, input_variables=["text_to_summarize"])
36
  chain = load_summarize_chain(llm, chain_type="map_reduce", return_intermediate_steps=True, map_prompt=summary_langage_prompt, combine_prompt=summary_langage_prompt)
37
  steps = chain({"input_documents": docs}, return_only_outputs=True)
38
 
 
30
 
31
  #résumé
32
  prompt_template = """Write a summary of the following, in the langage of the original text:
33
+ {text}
34
  SUMMARY:"""
35
+ summary_langage_prompt = PromptTemplate(template=prompt_template, input_variables=['text'])
36
  chain = load_summarize_chain(llm, chain_type="map_reduce", return_intermediate_steps=True, map_prompt=summary_langage_prompt, combine_prompt=summary_langage_prompt)
37
  steps = chain({"input_documents": docs}, return_only_outputs=True)
38