Update pages/1_Earnings_Sentiment_Analysis_π_.py
Browse files
pages/1_Earnings_Sentiment_Analysis_π_.py
CHANGED
@@ -9,6 +9,9 @@ st.set_page_config(page_title="Earnings Sentiment Analysis", page_icon="π")
|
|
9 |
st.sidebar.header("Sentiment Analysis")
|
10 |
st.markdown("## Earnings Sentiment Analysis with FinBert-Tone")
|
11 |
|
|
|
|
|
|
|
12 |
if st.session_state.url or st.session_state.upload:
|
13 |
|
14 |
results, title = inference(st.session_state.url,st.session_state.upload)
|
@@ -17,6 +20,8 @@ if st.session_state.url or st.session_state.upload:
|
|
17 |
|
18 |
earnings_passages = results['text']
|
19 |
|
|
|
|
|
20 |
with open('earnings.txt','w') as f:
|
21 |
f.write(earnings_passages)
|
22 |
|
|
|
9 |
st.sidebar.header("Sentiment Analysis")
|
10 |
st.markdown("## Earnings Sentiment Analysis with FinBert-Tone")
|
11 |
|
12 |
+
if 'earnings_passages' not in st.session_state:
|
13 |
+
st.session_state['earnings_passages'] = ''
|
14 |
+
|
15 |
if st.session_state.url or st.session_state.upload:
|
16 |
|
17 |
results, title = inference(st.session_state.url,st.session_state.upload)
|
|
|
20 |
|
21 |
earnings_passages = results['text']
|
22 |
|
23 |
+
st.session_state['earnings_passages'] = earnings_passages
|
24 |
+
|
25 |
with open('earnings.txt','w') as f:
|
26 |
f.write(earnings_passages)
|
27 |
|