Update pages/3_Earnings_Semantic_Search_π_.py
Browse files
pages/3_Earnings_Semantic_Search_π_.py
CHANGED
@@ -46,9 +46,11 @@ if any(st.session_state["sen_df"]) or st.session_state["earnings_passages"]:
|
|
46 |
hits = sorted(hits, key=lambda x: x['cross-score'], reverse=True)
|
47 |
|
48 |
score='cross-score'
|
49 |
-
df = pd.DataFrame([(hit[score],passages[hit['corpus_id']]) for hit in hits[0:
|
50 |
df['Score'] = round(df['Score'],2)
|
51 |
|
|
|
|
|
52 |
def gen_annotated_text(para):
|
53 |
tag_list = []
|
54 |
for i in sent_tokenize(para):
|
|
|
46 |
hits = sorted(hits, key=lambda x: x['cross-score'], reverse=True)
|
47 |
|
48 |
score='cross-score'
|
49 |
+
df = pd.DataFrame([(hit[score],passages[hit['corpus_id']]) for hit in hits[0:int(top_k)]],columns=['Score','Text'])
|
50 |
df['Score'] = round(df['Score'],2)
|
51 |
|
52 |
+
print(f'Test: {df}')
|
53 |
+
|
54 |
def gen_annotated_text(para):
|
55 |
tag_list = []
|
56 |
for i in sent_tokenize(para):
|