nickmuchi commited on
Commit
16f2ce2
β€’
1 Parent(s): 8e2eef3

Update pages/3_Earnings_Semantic_Search_πŸ”Ž_.py

Browse files
pages/3_Earnings_Semantic_Search_πŸ”Ž_.py CHANGED
@@ -10,20 +10,20 @@ def gen_sentiment(text):
10
  return sent_pipe(text)[0]['label']
11
 
12
  def gen_annotated_text(df):
13
- '''Generate annotated text'''
14
-
15
- tag_list=[]
16
- for row in df.itertuples():
17
- label = row[2]
18
- text = row[1]
19
- if label == 'Positive':
20
- tag_list.append((text,label,'#8fce00'))
21
- elif label == 'Negative':
22
- tag_list.append((text,label,'#f44336'))
23
- else:
24
- tag_list.append((text,label,'#000000'))
25
-
26
- return tag_list
27
 
28
  bi_enc_dict = {'mpnet-base-v2':"all-mpnet-base-v2",
29
  'instructor-base': 'hkunlp/instructor-base',
 
10
  return sent_pipe(text)[0]['label']
11
 
12
  def gen_annotated_text(df):
13
+ '''Generate annotated text'''
14
+
15
+ tag_list=[]
16
+ for row in df.itertuples():
17
+ label = row[2]
18
+ text = row[1]
19
+ if label == 'Positive':
20
+ tag_list.append((text,label,'#8fce00'))
21
+ elif label == 'Negative':
22
+ tag_list.append((text,label,'#f44336'))
23
+ else:
24
+ tag_list.append((text,label,'#000000'))
25
+
26
+ return tag_list
27
 
28
  bi_enc_dict = {'mpnet-base-v2':"all-mpnet-base-v2",
29
  'instructor-base': 'hkunlp/instructor-base',