SelmaNajih001 commited on
Commit
5cd0f1d
·
verified ·
1 Parent(s): ceb3db9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -70,7 +70,7 @@ for i, row in df_to_add.iterrows():
70
 
71
  # FinBERT
72
  try:
73
- res_f = finbert_pipeline(row['Summary'])[0]
74
  df_to_add.at[i,'FinBERT_Sentiment'] = res_f['label'].upper().strip()
75
  df_to_add.at[i,'FinBERT_Confidence'] = res_f['score']
76
  except:
@@ -80,10 +80,10 @@ for i, row in df_to_add.iterrows():
80
  # Regression
81
  try:
82
  if company == "Tesla, Inc.":
83
- val = price_pipeline_tesla(row['Summary'])[0]['score']
84
  df_to_add.at[i,'Predicted'] = max(val, 1.0)
85
  elif company == "Microsoft":
86
- val = price_pipeline_msft(row['Summary'])[0]['score']
87
  df_to_add.at[i,'Predicted'] = max(val, 1.0)
88
  except:
89
  df_to_add.at[i,'Predicted'] = 0.0
 
70
 
71
  # FinBERT
72
  try:
73
+ res_f = finbert_pipeline(row['Title'])[0]
74
  df_to_add.at[i,'FinBERT_Sentiment'] = res_f['label'].upper().strip()
75
  df_to_add.at[i,'FinBERT_Confidence'] = res_f['score']
76
  except:
 
80
  # Regression
81
  try:
82
  if company == "Tesla, Inc.":
83
+ val = price_pipeline_tesla(row['Title'])[0]['score']
84
  df_to_add.at[i,'Predicted'] = max(val, 1.0)
85
  elif company == "Microsoft":
86
+ val = price_pipeline_msft(row['Title'])[0]['score']
87
  df_to_add.at[i,'Predicted'] = max(val, 1.0)
88
  except:
89
  df_to_add.at[i,'Predicted'] = 0.0