Update app.py
Browse files
app.py
CHANGED
@@ -9,7 +9,7 @@ def sentiment(summary):
|
|
9 |
|
10 |
|
11 |
def main():
|
12 |
-
|
13 |
st.set_page_config(page_title="Your Finance news", page_icon="📰")
|
14 |
st.header("Summarize Your Finance News and Analyze Sentiment")
|
15 |
text=st.text_input('Input your Finance news(Max lenth<=3000): ',max_chars=3000)
|
@@ -26,7 +26,7 @@ def main():
|
|
26 |
#Stage 2: Sentiment Analytics
|
27 |
st.text('Processing Sentiment Analytics...')
|
28 |
label = sentiment(summary)
|
29 |
-
|
30 |
st.text('The sentiment of finance news is: ')
|
31 |
st.write(label)
|
32 |
|
|
|
9 |
|
10 |
|
11 |
def main():
|
12 |
+
dicts={"bullish":'Positive',"bearish":'Negative','neutral':"Neutral"}
|
13 |
st.set_page_config(page_title="Your Finance news", page_icon="📰")
|
14 |
st.header("Summarize Your Finance News and Analyze Sentiment")
|
15 |
text=st.text_input('Input your Finance news(Max lenth<=3000): ',max_chars=3000)
|
|
|
26 |
#Stage 2: Sentiment Analytics
|
27 |
st.text('Processing Sentiment Analytics...')
|
28 |
label = sentiment(summary)
|
29 |
+
label=dicts[label]
|
30 |
st.text('The sentiment of finance news is: ')
|
31 |
st.write(label)
|
32 |
|