Added Finbert Sentiment model
Browse files
app.py
CHANGED
@@ -27,7 +27,8 @@ def summarize_text(text):
|
|
27 |
##Fiscal Sentiment
|
28 |
#fin_model = pipeline("text-classification", model="demo-org/auditor_review_model",
|
29 |
# tokenizer="demo-org/auditor_review_model",use_auth_token=auth_token)
|
30 |
-
fin_model = pipeline("text-classification")
|
|
|
31 |
def text_to_sentiment(text):
|
32 |
sentiment = fin_model(text)[0]["label"]
|
33 |
return sentiment
|
|
|
27 |
##Fiscal Sentiment
|
28 |
#fin_model = pipeline("text-classification", model="demo-org/auditor_review_model",
|
29 |
# tokenizer="demo-org/auditor_review_model",use_auth_token=auth_token)
|
30 |
+
#fin_model = pipeline("text-classification")
|
31 |
+
fin_model= pipeline("sentiment-analysis", model='yiyanghkust/finbert-tone', tokenizer='yiyanghkust/finbert-tone')
|
32 |
def text_to_sentiment(text):
|
33 |
sentiment = fin_model(text)[0]["label"]
|
34 |
return sentiment
|