Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -65,7 +65,7 @@ def summarize_data(docs,llm_model,chain_type='refine'):
|
|
65 |
|
66 |
chain = load_summarize_chain(llm=llm_model,
|
67 |
chain_type=chain_type,
|
68 |
-
|
69 |
# refine_prompt=,
|
70 |
return_intermediate_steps=False,
|
71 |
input_key="input_documents",
|
@@ -75,8 +75,8 @@ def summarize_data(docs,llm_model,chain_type='refine'):
|
|
75 |
output_text = summary["output_text"].replace('\n',' ')
|
76 |
|
77 |
consice_sumary = re.search("CONCISE SUMMARY:.*\.*$", output_text).group(0)
|
78 |
-
|
79 |
-
return consice_sumary
|
80 |
|
81 |
# matches = re.finditer(regex, output_text, re.DOTALL)
|
82 |
# for matchNum, match in enumerate(matches, start=1):
|
|
|
65 |
|
66 |
chain = load_summarize_chain(llm=llm_model,
|
67 |
chain_type=chain_type,
|
68 |
+
question_prompt=prompt,
|
69 |
# refine_prompt=,
|
70 |
return_intermediate_steps=False,
|
71 |
input_key="input_documents",
|
|
|
75 |
output_text = summary["output_text"].replace('\n',' ')
|
76 |
|
77 |
consice_sumary = re.search("CONCISE SUMMARY:.*\.*$", output_text).group(0)
|
78 |
+
|
79 |
+
return consice_sumary.replace(' ','\n')
|
80 |
|
81 |
# matches = re.finditer(regex, output_text, re.DOTALL)
|
82 |
# for matchNum, match in enumerate(matches, start=1):
|