Update app.py
Browse files
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 |
-
|
20 |
-
|
21 |
-
|
22 |
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
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()
|