Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -38,19 +38,18 @@ def predict(text):
|
|
38 |
markdown_text = '''
|
39 |
<h1>Structured Sentiment Analysis for Norwegian</h1>
|
40 |
<p align="left">
|
41 |
-
This space provides a gradio demo of a <a href="https://huggingface.co/ltg/ssa-perin">pretrained model</a> for structured sentiment analysis (SSA) of Norwegian text, trained on the
|
42 |
-
<br
|
43 |
-
|
44 |
<ul>
|
45 |
-
<li> <
|
46 |
-
<li> <
|
47 |
-
<li> <
|
48 |
-
<li> and finally the <
|
49 |
</ul>
|
50 |
-
<br
|
51 |
To download the model and find more in-depth documentation, please see <a href="https://huggingface.co/ltg/ssa-perin">https://huggingface.co/ltg/ssa-perin</a>
|
52 |
</p>
|
53 |
-
<br>
|
54 |
'''
|
55 |
|
56 |
with gr.Blocks() as demo:
|
|
|
38 |
markdown_text = '''
|
39 |
<h1>Structured Sentiment Analysis for Norwegian</h1>
|
40 |
<p align="left">
|
41 |
+
This space provides a gradio demo of a <a href="https://huggingface.co/ltg/ssa-perin">pretrained model</a> for structured sentiment analysis (SSA) of Norwegian text, trained on the <a href="https://github.com/ltgoslo/norec_fine">NoReC_fine</a> dataset by the <a href"https://www.mn.uio.no/ifi/english/research/groups/ltg/">Language Technology Group</a> at the University of Oslo. It implements a method described in the paper <a href="https://aclanthology.org/2022.acl-short.51/">Direct parsing to sentiment graphs</a> by Samuel et al. 2022.
|
42 |
+
<br>
|
43 |
+
For a given sentence, the model will attempt to identify the following components if it is found to be sentiment-bearing:
|
44 |
<ul>
|
45 |
+
<li> <i>source expressions</i> (the opinion holder), </li>
|
46 |
+
<li> <i>target expressions</i> (what the opinion is directed towards), </li>
|
47 |
+
<li> <i>polar expressions</i> (the part of the text indicating that an opinion is expressed), </li>
|
48 |
+
<li> and finally the <i>polarity</i> (positive or negative). </li>
|
49 |
</ul>
|
50 |
+
<br>
|
51 |
To download the model and find more in-depth documentation, please see <a href="https://huggingface.co/ltg/ssa-perin">https://huggingface.co/ltg/ssa-perin</a>
|
52 |
</p>
|
|
|
53 |
'''
|
54 |
|
55 |
with gr.Blocks() as demo:
|