Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -29,10 +29,10 @@ def sentiment_analysis(sentence, model_name):
|
|
| 29 |
"negative": negative,
|
| 30 |
}
|
| 31 |
type_dic = {
|
| 32 |
-
"CCCC/
|
| 33 |
-
"CCCC/
|
| 34 |
-
"CCCC/
|
| 35 |
-
"CCCC/
|
| 36 |
}
|
| 37 |
testdata = []
|
| 38 |
for i,sentence in enumerate(sentences):
|
|
@@ -73,11 +73,11 @@ def sentiment_analysis(sentence, model_name):
|
|
| 73 |
|
| 74 |
demo = gr.Interface(fn=sentiment_analysis,
|
| 75 |
inputs = [gr.Textbox(placeholder="Enter sentence here. If you have multiple sentences, separate them with '\\n'.",label="Sentence",lines=5),
|
| 76 |
-
gr.Radio(choices=["
|
| 77 |
-
"
|
| 78 |
outputs=gr.Textbox(label="Sentiment",lines=5),
|
| 79 |
# css = "label.svelte-1p9xokt{width:35%;}",
|
| 80 |
-
title = "
|
| 81 |
)
|
| 82 |
|
| 83 |
demo.launch()
|
|
|
|
| 29 |
"negative": negative,
|
| 30 |
}
|
| 31 |
type_dic = {
|
| 32 |
+
"CCCC/RoBERTa_Chinese_AnnualReport_tuned":"roberta",
|
| 33 |
+
"CCCC/RoBERTa_Chinese_Financial_News_tuned":"roberta",
|
| 34 |
+
"CCCC/RoBERTa_English_AnnualReport_tuned":"roberta",
|
| 35 |
+
"CCCC/RoBERTa_English_Financial_News_tuned":"roberta",
|
| 36 |
}
|
| 37 |
testdata = []
|
| 38 |
for i,sentence in enumerate(sentences):
|
|
|
|
| 73 |
|
| 74 |
demo = gr.Interface(fn=sentiment_analysis,
|
| 75 |
inputs = [gr.Textbox(placeholder="Enter sentence here. If you have multiple sentences, separate them with '\\n'.",label="Sentence",lines=5),
|
| 76 |
+
gr.Radio(choices=["RoBERTa_Chinese_AnnualReport_tuned","RoBERTa_Chinese_Financial_News_tuned","RoBERTa_English_AnnualReport_tuned",
|
| 77 |
+
"RoBERTa_English_Financial_News_tuned"], label="Model Selection")],
|
| 78 |
outputs=gr.Textbox(label="Sentiment",lines=5),
|
| 79 |
# css = "label.svelte-1p9xokt{width:35%;}",
|
| 80 |
+
title = "Prompt Learning-Based Disclosure Sentiment Detection"
|
| 81 |
)
|
| 82 |
|
| 83 |
demo.launch()
|