Update app.py
Browse files
app.py
CHANGED
@@ -17,17 +17,18 @@ def main():
|
|
17 |
st.text_area('Your Finance News: ',text,height=100)
|
18 |
|
19 |
#Stage 1: Text Summarization
|
20 |
-
st.text('Processing Finance News Summarization...')
|
21 |
-
|
22 |
-
|
23 |
-
|
|
|
24 |
|
25 |
#Stage 2: Sentiment Analytics
|
26 |
-
st.
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
|
32 |
if __name__ == "__main__":
|
33 |
main()
|
|
|
17 |
st.text_area('Your Finance News: ',text,height=100)
|
18 |
|
19 |
#Stage 1: Text Summarization
|
20 |
+
#st.text('Processing Finance News Summarization...')
|
21 |
+
with st.status("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.text_area('Your Finance News Summary',summary,height=30)
|
25 |
|
26 |
#Stage 2: Sentiment Analytics
|
27 |
+
with st.status("Processing Sentiment Analytics.."):
|
28 |
+
#st.text('Processing Sentiment Analytics...')
|
29 |
+
label = sentiment(summary)
|
30 |
+
label=dicts[label]
|
31 |
+
st.text_area('The sentiment of finance news is: ',label)
|
32 |
|
33 |
if __name__ == "__main__":
|
34 |
main()
|