Spaces:
Sleeping
Sleeping
Samarth991
commited on
Commit
•
882ceed
1
Parent(s):
fe84c5e
adding app
Browse files
app.py
CHANGED
@@ -73,7 +73,7 @@ def summarize_data(docs,llm_model,chain_type='refine'):
|
|
73 |
summary = chain({"input_documents": docs}, return_only_outputs=True)
|
74 |
output_text = summary["output_text"].replace('\n','')
|
75 |
|
76 |
-
consice_sumary = re.search("CONCISE SUMMARY:.*\.*$",
|
77 |
dash_id = consice_sumary.find('-')
|
78 |
return consice_sumary[:dash_id]
|
79 |
# matches = re.finditer(regex, output_text, re.DOTALL)
|
|
|
73 |
summary = chain({"input_documents": docs}, return_only_outputs=True)
|
74 |
output_text = summary["output_text"].replace('\n','')
|
75 |
|
76 |
+
consice_sumary = re.search("CONCISE SUMMARY:.*\.*$", output_text).group(0)
|
77 |
dash_id = consice_sumary.find('-')
|
78 |
return consice_sumary[:dash_id]
|
79 |
# matches = re.finditer(regex, output_text, re.DOTALL)
|