Update pages/2_Earnings_Summarization_π_.py
Browse files
pages/2_Earnings_Summarization_π_.py
CHANGED
@@ -19,7 +19,12 @@ if st.session_state['earnings_passages']:
|
|
19 |
|
20 |
with st.spinner("Summarizing and matching entities, this takes a few seconds..."):
|
21 |
text_to_summarize = chunk_and_preprocess_text(st.session_state['earnings_passages'])
|
22 |
-
summarized_text = sum_pipe(text_to_summarize,max_length=max_len,min_length=min_len,clean_up_tokenization_spaces=True,no_repeat_ngram_size=
|
|
|
|
|
|
|
|
|
|
|
23 |
summarized_text = ' '.join([summ['summary_text'] for summ in summarized_text])
|
24 |
entity_match_html = highlight_entities(text_to_summarize,summarized_text)
|
25 |
st.markdown("####")
|
|
|
19 |
|
20 |
with st.spinner("Summarizing and matching entities, this takes a few seconds..."):
|
21 |
text_to_summarize = chunk_and_preprocess_text(st.session_state['earnings_passages'])
|
22 |
+
summarized_text = sum_pipe(text_to_summarize,max_length=max_len,min_length=min_len,clean_up_tokenization_spaces=True,no_repeat_ngram_size=3,
|
23 |
+
encoder_no_repeat_ngram_size=3,
|
24 |
+
repetition_penalty=3.5,
|
25 |
+
num_beams=4,
|
26 |
+
do_sample=False,
|
27 |
+
early_stopping=True)
|
28 |
summarized_text = ' '.join([summ['summary_text'] for summ in summarized_text])
|
29 |
entity_match_html = highlight_entities(text_to_summarize,summarized_text)
|
30 |
st.markdown("####")
|