Update pages/1_Earnings_Sentiment_Analysis_π_.py
Browse files
pages/1_Earnings_Sentiment_Analysis_π_.py
CHANGED
@@ -12,7 +12,7 @@ st.markdown("## Earnings Sentiment Analysis with FinBert-Tone")
|
|
12 |
if "url" not in st.session_state:
|
13 |
st.session_state.url = ''
|
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)
|
18 |
|
@@ -21,12 +21,6 @@ if st.session_state['url'] or st.session_state['upload']:
|
|
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 |
-
|
28 |
-
with open('earnings.txt','r') as f:
|
29 |
-
earnings_passages = f.read()
|
30 |
|
31 |
earnings_sentiment, earnings_sentences = sentiment_pipe(earnings_passages)
|
32 |
|
|
|
12 |
if "url" not in st.session_state:
|
13 |
st.session_state.url = ''
|
14 |
|
15 |
+
if st.session_state['url'] is not None or st.session_state['upload'] is not None:
|
16 |
|
17 |
results, title = inference(st.session_state.url,st.session_state.upload)
|
18 |
|
|
|
21 |
earnings_passages = results['text']
|
22 |
|
23 |
st.session_state['earnings_passages'] = earnings_passages
|
|
|
|
|
|
|
|
|
|
|
|
|
24 |
|
25 |
earnings_sentiment, earnings_sentences = sentiment_pipe(earnings_passages)
|
26 |
|