Spaces:
Build error
Build error
Commit
·
b0bf7bb
1
Parent(s):
3cf9c24
Add application file
Browse files- .ipynb_checkpoints/app-checkpoint.py +2 -1
- app.py +2 -1
.ipynb_checkpoints/app-checkpoint.py
CHANGED
@@ -49,7 +49,8 @@ def summarize_text2(text):
|
|
49 |
return stext
|
50 |
|
51 |
##Fiscal Tone Analysis
|
52 |
-
sen_model= pipeline("sentiment-analysis", model='
|
|
|
53 |
def text_to_sentiment(text):
|
54 |
sentiment = sen_model(text)[0]["label"]
|
55 |
return sentiment
|
|
|
49 |
return stext
|
50 |
|
51 |
##Fiscal Tone Analysis
|
52 |
+
sen_model= pipeline("sentiment-analysis", model='yiyanghkust/finbert-tone', tokenizer='yiyanghkust/finbert-tone')
|
53 |
+
# sen_model= pipeline("sentiment-analysis", model='knkarthick/Sentiment-Analysis', tokenizer='knkarthick/Sentiment-Analysis')
|
54 |
def text_to_sentiment(text):
|
55 |
sentiment = sen_model(text)[0]["label"]
|
56 |
return sentiment
|
app.py
CHANGED
@@ -49,7 +49,8 @@ def summarize_text2(text):
|
|
49 |
return stext
|
50 |
|
51 |
##Fiscal Tone Analysis
|
52 |
-
sen_model= pipeline("sentiment-analysis", model='
|
|
|
53 |
def text_to_sentiment(text):
|
54 |
sentiment = sen_model(text)[0]["label"]
|
55 |
return sentiment
|
|
|
49 |
return stext
|
50 |
|
51 |
##Fiscal Tone Analysis
|
52 |
+
sen_model= pipeline("sentiment-analysis", model='yiyanghkust/finbert-tone', tokenizer='yiyanghkust/finbert-tone')
|
53 |
+
# sen_model= pipeline("sentiment-analysis", model='knkarthick/Sentiment-Analysis', tokenizer='knkarthick/Sentiment-Analysis')
|
54 |
def text_to_sentiment(text):
|
55 |
sentiment = sen_model(text)[0]["label"]
|
56 |
return sentiment
|