Spaces:
Runtime error
Runtime error
Commit
·
9af7842
1
Parent(s):
af1fb7b
Update app.py
Browse files
app.py
CHANGED
@@ -94,5 +94,7 @@ JOB#: Job Number 20340"""
|
|
94 |
|
95 |
input_text = st.text_area("Notes:", prompt)
|
96 |
if st.button('Summarize'):
|
97 |
-
|
|
|
|
|
98 |
st.write(summarize_function(final_input))
|
|
|
94 |
|
95 |
input_text = st.text_area("Notes:", prompt)
|
96 |
if st.button('Summarize'):
|
97 |
+
parsed_input = re.sub(r'\n\s*\n', '\n\n', input_text)
|
98 |
+
parsed_input = re.sub(r'\n+', '\n',parsed_input)
|
99 |
+
final_input = f"""[Notes]:\n{parsed_input}\n[Summary]:\n"""
|
100 |
st.write(summarize_function(final_input))
|