Update pages/1_Earnings_Sentiment_Analysis_π_.py
Browse files
pages/1_Earnings_Sentiment_Analysis_π_.py
CHANGED
@@ -6,9 +6,14 @@ from functions import *
|
|
6 |
import validators
|
7 |
|
8 |
#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 "url" not in st.session_state:
|
13 |
st.session_state.url = ''
|
14 |
|
@@ -16,7 +21,7 @@ try:
|
|
16 |
|
17 |
if st.session_state['url'] is not None or st.session_state['upload'] is not None:
|
18 |
|
19 |
-
results, title = inference(st.session_state.url,st.session_state.upload)
|
20 |
|
21 |
st.subheader(title)
|
22 |
|
|
|
6 |
import validators
|
7 |
|
8 |
#st.set_page_config(page_title="Earnings Sentiment Analysis", page_icon="π")
|
9 |
+
asr_model_options = ['base','small']
|
10 |
+
asr_model_name = st.sidebar.selectbox("Whisper Model", options=asr_model_options, key='sbox')
|
11 |
st.sidebar.header("Sentiment Analysis")
|
12 |
st.markdown("## Earnings Sentiment Analysis with FinBert-Tone")
|
13 |
|
14 |
+
#load whisper model
|
15 |
+
asr_model = load_asr_model(asr_model_name)
|
16 |
+
|
17 |
if "url" not in st.session_state:
|
18 |
st.session_state.url = ''
|
19 |
|
|
|
21 |
|
22 |
if st.session_state['url'] is not None or st.session_state['upload'] is not None:
|
23 |
|
24 |
+
results, title = inference(st.session_state.url,st.session_state.upload,asr_model)
|
25 |
|
26 |
st.subheader(title)
|
27 |
|