Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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['
|
| 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['
|
| 84 |
df_to_add.at[i,'Predicted'] = max(val, 1.0)
|
| 85 |
elif company == "Microsoft":
|
| 86 |
-
val = price_pipeline_msft(row['
|
| 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
|