Update app.py
Browse files
app.py
CHANGED
@@ -14,24 +14,21 @@ def main():
|
|
14 |
text=st.text_input('Input your Finance news(Max lenth<=3000): ',None,max_chars=3000)
|
15 |
if text is not None:
|
16 |
st.text('Your Finance news: ')
|
17 |
-
st.
|
18 |
-
|
19 |
-
st.divider() # Draws a horizontal rule
|
20 |
#Stage 1: Text Summarization
|
21 |
st.text('Processing Finance News Summarization...')
|
22 |
text_summarize=pipeline("summarization", model="nickmuchi/fb-bart-large-finetuned-trade-the-event-finance-summarizer")
|
23 |
summary=text_summarize(text)[0]['summary_text']
|
24 |
-
st.
|
25 |
-
|
26 |
-
st.divider() # Draws a horizontal rule
|
27 |
#Stage 2: Sentiment Analytics
|
28 |
st.text('Processing Sentiment Analytics...')
|
29 |
label = sentiment(summary)
|
30 |
label=dicts[label]
|
31 |
-
|
32 |
-
st.divider() # Draws a horizontal rule
|
33 |
st.text('The sentiment of finance news is: ')
|
34 |
-
st.
|
35 |
|
36 |
if __name__ == "__main__":
|
37 |
main()
|
|
|
14 |
text=st.text_input('Input your Finance news(Max lenth<=3000): ',None,max_chars=3000)
|
15 |
if text is not None:
|
16 |
st.text('Your Finance news: ')
|
17 |
+
st.text_area(text)
|
18 |
+
|
|
|
19 |
#Stage 1: Text Summarization
|
20 |
st.text('Processing Finance News Summarization...')
|
21 |
text_summarize=pipeline("summarization", model="nickmuchi/fb-bart-large-finetuned-trade-the-event-finance-summarizer")
|
22 |
summary=text_summarize(text)[0]['summary_text']
|
23 |
+
st.text_area(summary)
|
24 |
+
|
|
|
25 |
#Stage 2: Sentiment Analytics
|
26 |
st.text('Processing Sentiment Analytics...')
|
27 |
label = sentiment(summary)
|
28 |
label=dicts[label]
|
29 |
+
|
|
|
30 |
st.text('The sentiment of finance news is: ')
|
31 |
+
st.text_area(label)
|
32 |
|
33 |
if __name__ == "__main__":
|
34 |
main()
|