nickmuchi commited on
Commit
f1d1353
β€’
1 Parent(s): 4896ebd

Update pages/2_Earnings_Summarization_πŸ“–_.py

Browse files
pages/2_Earnings_Summarization_πŸ“–_.py CHANGED
@@ -3,7 +3,7 @@ from functions import *
3
 
4
  st.set_page_config(page_title="Earnings Summarization", page_icon="πŸ“–")
5
  st.sidebar.header("Earnings Summarization")
6
- st.markdown("## Earnings Summarization with FaceBook-Bart")
7
 
8
  max_len= st.slider("Maximum length of the summarized text",min_value=70,max_value=200,step=10,value=100)
9
  min_len= st.slider("Minimum length of the summarized text",min_value=20,max_value=200,step=10)
@@ -27,13 +27,13 @@ if st.session_state['earnings_passages']:
27
  except IndexError:
28
  try:
29
 
30
- text_to_summarize = chunk_and_preprocess_text(st.session_state['earnings_passages'],450)
31
  summarized_text = summarize_text(text_to_summarize,max_len=max_len,min_len=min_len)
32
 
33
 
34
  except IndexError:
35
 
36
- text_to_summarize = chunk_and_preprocess_text(st.session_state['earnings_passages'],400)
37
  summarized_text = summarize_text(text_to_summarize,max_len=max_len,min_len=min_len)
38
 
39
  entity_match_html = highlight_entities(text_to_summarize,summarized_text)
 
3
 
4
  st.set_page_config(page_title="Earnings Summarization", page_icon="πŸ“–")
5
  st.sidebar.header("Earnings Summarization")
6
+ st.markdown("## Earnings Summarization with Flan-T5-Base-SamSun")
7
 
8
  max_len= st.slider("Maximum length of the summarized text",min_value=70,max_value=200,step=10,value=100)
9
  min_len= st.slider("Minimum length of the summarized text",min_value=20,max_value=200,step=10)
 
27
  except IndexError:
28
  try:
29
 
30
+ text_to_summarize = chunk_and_preprocess_text(st.session_state['earnings_passages'])
31
  summarized_text = summarize_text(text_to_summarize,max_len=max_len,min_len=min_len)
32
 
33
 
34
  except IndexError:
35
 
36
+ text_to_summarize = chunk_and_preprocess_text(st.session_state['earnings_passages'])
37
  summarized_text = summarize_text(text_to_summarize,max_len=max_len,min_len=min_len)
38
 
39
  entity_match_html = highlight_entities(text_to_summarize,summarized_text)