Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -19,7 +19,7 @@ def readLMwords():
|
|
19 |
|
20 |
|
21 |
def sentiment_analysis(sentence, model_name):
|
22 |
-
model_name = "
|
23 |
raw_sentences = sentence.strip().split('\n')
|
24 |
template = '{"placeholder":"text_a"} Shares are {"mask"}.'
|
25 |
classes = ['positive', 'neutral', 'negative']
|
@@ -30,10 +30,10 @@ def sentiment_analysis(sentence, model_name):
|
|
30 |
"negative": negative,
|
31 |
}
|
32 |
type_dic = {
|
33 |
-
"
|
34 |
-
"
|
35 |
-
"
|
36 |
-
"
|
37 |
}
|
38 |
|
39 |
if 'Chinese' in model_name:
|
|
|
19 |
|
20 |
|
21 |
def sentiment_analysis(sentence, model_name):
|
22 |
+
model_name = "HYCCC/"+model_name
|
23 |
raw_sentences = sentence.strip().split('\n')
|
24 |
template = '{"placeholder":"text_a"} Shares are {"mask"}.'
|
25 |
classes = ['positive', 'neutral', 'negative']
|
|
|
30 |
"negative": negative,
|
31 |
}
|
32 |
type_dic = {
|
33 |
+
"HYCCC/RoBERTa_Chinese_AnnualReport_tuned":"roberta",
|
34 |
+
"HYCCC/RoBERTa_Chinese_FinancialNews_tuned":"roberta",
|
35 |
+
"HYCCC/RoBERTa_English_AnnualReport_tuned":"roberta",
|
36 |
+
"HYCCC/RoBERTa_English_FinancialNews_tuned":"roberta",
|
37 |
}
|
38 |
|
39 |
if 'Chinese' in model_name:
|