Spaces:
Running
Running
kovacsvi
commited on
Commit
·
5a96041
1
Parent(s):
66a2cfc
added analytics script
Browse files
app.py
CHANGED
@@ -26,6 +26,10 @@ css = """
|
|
26 |
.title_ {text-align: center;}
|
27 |
"""
|
28 |
|
|
|
|
|
|
|
|
|
29 |
HF_TOKEN = os.environ["hf_read"]
|
30 |
|
31 |
SENTIMENT_LABEL_NAMES = {
|
@@ -224,7 +228,7 @@ def predict_wrapper(text, language):
|
|
224 |
return results, figure, heatmap, output_info + funding_info
|
225 |
|
226 |
|
227 |
-
with gr.Blocks(css=css) as demo:
|
228 |
placeholder = "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua."
|
229 |
introduction = """
|
230 |
This application detects and visualises emotions in text. The model behind it operates using a 6-label codebook, including the following labels: `Anger`, `Fear`, `Disgust`, `Sadness`, `Joy`, and `None of Them`.
|
@@ -233,6 +237,7 @@ with gr.Blocks(css=css) as demo:
|
|
233 |
Read our Q&A about Pulse [here](https://cms.mores-horizon.eu/uploads/MORES_Pulse_Q_and_A_33f61ea348.pdf).
|
234 |
"""
|
235 |
|
|
|
236 |
gr.HTML("<h1>MORES Pulse</h1>", elem_classes="title_")
|
237 |
gr.Markdown(introduction, elem_classes="info")
|
238 |
with gr.Row():
|
|
|
26 |
.title_ {text-align: center;}
|
27 |
"""
|
28 |
|
29 |
+
analytics_script = """
|
30 |
+
<script defer src="https://umami.dsd.sztaki.hu/script.js" data-website-id="d6b16d5f-2bc5-4a51-b7dc-49ac28c71fa8"></script>
|
31 |
+
"""
|
32 |
+
|
33 |
HF_TOKEN = os.environ["hf_read"]
|
34 |
|
35 |
SENTIMENT_LABEL_NAMES = {
|
|
|
228 |
return results, figure, heatmap, output_info + funding_info
|
229 |
|
230 |
|
231 |
+
with gr.Blocks(css=css, js=js) as demo:
|
232 |
placeholder = "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua."
|
233 |
introduction = """
|
234 |
This application detects and visualises emotions in text. The model behind it operates using a 6-label codebook, including the following labels: `Anger`, `Fear`, `Disgust`, `Sadness`, `Joy`, and `None of Them`.
|
|
|
237 |
Read our Q&A about Pulse [here](https://cms.mores-horizon.eu/uploads/MORES_Pulse_Q_and_A_33f61ea348.pdf).
|
238 |
"""
|
239 |
|
240 |
+
gr.HTML(analytics_script)
|
241 |
gr.HTML("<h1>MORES Pulse</h1>", elem_classes="title_")
|
242 |
gr.Markdown(introduction, elem_classes="info")
|
243 |
with gr.Row():
|