WillWEI0103 commited on
Commit
8f44023
·
verified ·
1 Parent(s): a65b326

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -13
app.py CHANGED
@@ -16,21 +16,21 @@ def main():
16
  st.set_page_config(page_title="Your Finance news", page_icon="📰")
17
  st.header("Summarize Your Finance News and Analyze Sentiment")
18
  text=st.text_input('Input your Finance news(Max lenth<=3000): ',max_chars=3000)
19
- if text is not None:
20
- st.text('Your Finance news: ')
21
- st.write(str(text))
22
 
23
- #Stage 1: Text Summarization
24
- st.text('Processing Finance News Summarization...')
25
- summary = text_summarize(text)
26
- st.write(summary)
27
 
28
- #Stage 2: Sentiment Analytics
29
- st.text('Processing Sentiment Analytics...')
30
- label = sentiment(summary)
31
- label=label.capitalize()
32
- st.text('The sentiment of finance news is: ')
33
- st.write(label)
34
 
35
  if __name__ == "__main__":
36
  main()
 
16
  st.set_page_config(page_title="Your Finance news", page_icon="📰")
17
  st.header("Summarize Your Finance News and Analyze Sentiment")
18
  text=st.text_input('Input your Finance news(Max lenth<=3000): ',max_chars=3000)
19
+
20
+ st.text('Your Finance news: ')
21
+ st.write(str(text))
22
 
23
+ #Stage 1: Text Summarization
24
+ st.text('Processing Finance News Summarization...')
25
+ summary = text_summarize(text)
26
+ st.write(summary)
27
 
28
+ #Stage 2: Sentiment Analytics
29
+ st.text('Processing Sentiment Analytics...')
30
+ label = sentiment(summary)
31
+ label=label.capitalize()
32
+ st.text('The sentiment of finance news is: ')
33
+ st.write(label)
34
 
35
  if __name__ == "__main__":
36
  main()