Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -53,7 +53,8 @@ def predict_sentiment(text):
|
|
53 |
input_ids, attention_mask = encoded_input["input_ids"], encoded_input["attention_mask"]
|
54 |
with torch.no_grad():
|
55 |
score = score_model(input_ids, attention_mask)[0].item()
|
56 |
-
|
|
|
57 |
|
58 |
# uses Polygon API to fetch article
|
59 |
def fetch_articles(ticker):
|
|
|
53 |
input_ids, attention_mask = encoded_input["input_ids"], encoded_input["attention_mask"]
|
54 |
with torch.no_grad():
|
55 |
score = score_model(input_ids, attention_mask)[0].item()
|
56 |
+
|
57 |
+
return (score-40)/40*100
|
58 |
|
59 |
# uses Polygon API to fetch article
|
60 |
def fetch_articles(ticker):
|