Update app.py
Browse files
app.py
CHANGED
@@ -21,14 +21,16 @@ def main():
|
|
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 |
-
|
|
|
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 |
-
|
|
|
32 |
|
33 |
if __name__ == "__main__":
|
34 |
main()
|
|
|
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 |
+
status.update(label="Summarization Completed", state="complete", expanded=False)
|
25 |
+
st.text_area('Your Finance News Summary',summary,height=30)
|
26 |
|
27 |
#Stage 2: Sentiment Analytics
|
28 |
with st.status("Processing Sentiment Analytics.."):
|
29 |
#st.text('Processing Sentiment Analytics...')
|
30 |
label = sentiment(summary)
|
31 |
label=dicts[label]
|
32 |
+
status.update(label="Sentiment Analytics Completed", state="complete", expanded=False)
|
33 |
+
st.text_area('The sentiment of finance news is: ',label)
|
34 |
|
35 |
if __name__ == "__main__":
|
36 |
main()
|