Update pages/3_Earnings_Semantic_Search_π_.py
Browse files
pages/3_Earnings_Semantic_Search_π_.py
CHANGED
@@ -11,9 +11,6 @@ search_input = st.text_input(
|
|
11 |
top_k = st.sidebar.slider("Number of Top Hits Generated",min_value=1,max_value=5,value=2)
|
12 |
|
13 |
window_size = st.sidebar.slider("Number of Sentences Generated in Search Response",min_value=1,max_value=5,value=3)
|
14 |
-
|
15 |
-
if "earnings_passages" not in st.session_state:
|
16 |
-
st.session_state["earnings_passages"] = ''
|
17 |
|
18 |
if search_input:
|
19 |
|
@@ -50,7 +47,9 @@ if search_input:
|
|
50 |
|
51 |
def gen_annotated_text(para,df=sen_df):
|
52 |
tag_list = []
|
|
|
53 |
for i in sent_tokenize(para):
|
|
|
54 |
label = df.loc[df['text']==i, 'label'].values[0]
|
55 |
if label == 'Negative':
|
56 |
tag_list.append((i,label,'#faa'))
|
|
|
11 |
top_k = st.sidebar.slider("Number of Top Hits Generated",min_value=1,max_value=5,value=2)
|
12 |
|
13 |
window_size = st.sidebar.slider("Number of Sentences Generated in Search Response",min_value=1,max_value=5,value=3)
|
|
|
|
|
|
|
14 |
|
15 |
if search_input:
|
16 |
|
|
|
47 |
|
48 |
def gen_annotated_text(para,df=sen_df):
|
49 |
tag_list = []
|
50 |
+
print(df)
|
51 |
for i in sent_tokenize(para):
|
52 |
+
print(df.loc[df['text']==i, 'label'])
|
53 |
label = df.loc[df['text']==i, 'label'].values[0]
|
54 |
if label == 'Negative':
|
55 |
tag_list.append((i,label,'#faa'))
|