Spaces:
Running
Running
Commit
·
8bb7a63
1
Parent(s):
fc18efa
Update app.py
Browse files
app.py
CHANGED
@@ -371,10 +371,10 @@ def topics(output_file, input_checks):
|
|
371 |
|
372 |
with gr.Blocks() as demo:
|
373 |
with gr.Row():
|
374 |
-
with gr.Column(scale=1):
|
375 |
gr.Markdown("""
|
376 |
""")
|
377 |
-
with gr.Column(scale=6
|
378 |
gr.Markdown("""
|
379 |
<div style="text-align: center"><h1>EmotioNL: A framework for Dutch emotion detection</h1></div>
|
380 |
|
@@ -382,14 +382,14 @@ with gr.Blocks() as demo:
|
|
382 |
|
383 |
This demo was made to demonstrate the EmotioNL model, a transformer-based classification model that analyses emotions in Dutch texts. The model uses [RobBERT](https://github.com/iPieter/RobBERT), which was further fine-tuned on the [EmotioNL dataset](https://lt3.ugent.be/resources/emotionl/). The resulting model is a classifier that, given a sentence, predicts one of the following emotion categories: _anger_, _fear_, _joy_, _love_, _sadness_ or _neutral_. The demo can be used either in **sentence mode**, which allows you to enter a sentence for which an emotion will be predicted; or in **dataset mode**, which allows you to upload a dataset or see the full functuonality of with example data.
|
384 |
""")
|
385 |
-
with gr.Column(scale=1):
|
386 |
gr.Markdown("""
|
387 |
""")
|
388 |
with gr.Row():
|
389 |
-
with gr.Column(scale=1):
|
390 |
gr.Markdown("""
|
391 |
""")
|
392 |
-
with gr.Column(scale=6
|
393 |
with gr.Tab("Sentence"):
|
394 |
gr.Markdown("""
|
395 |
""")
|
@@ -469,21 +469,21 @@ with gr.Blocks() as demo:
|
|
469 |
next_button_topics.click(fn=topics, inputs=[output_file,input_checks], outputs=output_topics)
|
470 |
send_btn.click(fn=unavailable, inputs=[input_file,input_checks], outputs=[output_markdown,message])
|
471 |
demo_btn.click(fn=showcase, inputs=[input_file], outputs=[output_markdown,message,output_file,next_button_freq,next_button_dist,next_button_peaks,next_button_topics])
|
472 |
-
with gr.Column(scale=1):
|
473 |
gr.Markdown("""
|
474 |
""")
|
475 |
|
476 |
with gr.Row():
|
477 |
-
with gr.Column(scale=1):
|
478 |
gr.Markdown("""
|
479 |
""")
|
480 |
-
with gr.Column(scale=6
|
481 |
gr.Markdown("""
|
482 |
<font size="2">Both this demo and the dataset have been created by [LT3](https://lt3.ugent.be/), the Language and Translation Technology Team of Ghent University. The EmotioNL project has been carried out with support from the Research Foundation – Flanders (FWO). For any questions, please contact [email protected].</font>
|
483 |
|
484 |
<div style="display: flex"><img style="margin-right: 1em" alt="LT3 logo" src="https://lt3.ugent.be/static/images/logo_v2_single.png" width="136" height="58"> <img style="margin-right: 1em" alt="FWO logo" src="https://www.fwo.be/images/logo_desktop.png" height="58"></div>
|
485 |
""")
|
486 |
-
with gr.Column(scale=1):
|
487 |
gr.Markdown("""
|
488 |
""")
|
489 |
demo.launch()
|
|
|
371 |
|
372 |
with gr.Blocks() as demo:
|
373 |
with gr.Row():
|
374 |
+
with gr.Column(scale=1, min_width=50):
|
375 |
gr.Markdown("""
|
376 |
""")
|
377 |
+
with gr.Column(scale=6):
|
378 |
gr.Markdown("""
|
379 |
<div style="text-align: center"><h1>EmotioNL: A framework for Dutch emotion detection</h1></div>
|
380 |
|
|
|
382 |
|
383 |
This demo was made to demonstrate the EmotioNL model, a transformer-based classification model that analyses emotions in Dutch texts. The model uses [RobBERT](https://github.com/iPieter/RobBERT), which was further fine-tuned on the [EmotioNL dataset](https://lt3.ugent.be/resources/emotionl/). The resulting model is a classifier that, given a sentence, predicts one of the following emotion categories: _anger_, _fear_, _joy_, _love_, _sadness_ or _neutral_. The demo can be used either in **sentence mode**, which allows you to enter a sentence for which an emotion will be predicted; or in **dataset mode**, which allows you to upload a dataset or see the full functuonality of with example data.
|
384 |
""")
|
385 |
+
with gr.Column(scale=1, min_width=50):
|
386 |
gr.Markdown("""
|
387 |
""")
|
388 |
with gr.Row():
|
389 |
+
with gr.Column(scale=1, min_width=50):
|
390 |
gr.Markdown("""
|
391 |
""")
|
392 |
+
with gr.Column(scale=6):
|
393 |
with gr.Tab("Sentence"):
|
394 |
gr.Markdown("""
|
395 |
""")
|
|
|
469 |
next_button_topics.click(fn=topics, inputs=[output_file,input_checks], outputs=output_topics)
|
470 |
send_btn.click(fn=unavailable, inputs=[input_file,input_checks], outputs=[output_markdown,message])
|
471 |
demo_btn.click(fn=showcase, inputs=[input_file], outputs=[output_markdown,message,output_file,next_button_freq,next_button_dist,next_button_peaks,next_button_topics])
|
472 |
+
with gr.Column(scale=1, min_width=50):
|
473 |
gr.Markdown("""
|
474 |
""")
|
475 |
|
476 |
with gr.Row():
|
477 |
+
with gr.Column(scale=1, min_width=50):
|
478 |
gr.Markdown("""
|
479 |
""")
|
480 |
+
with gr.Column(scale=6):
|
481 |
gr.Markdown("""
|
482 |
<font size="2">Both this demo and the dataset have been created by [LT3](https://lt3.ugent.be/), the Language and Translation Technology Team of Ghent University. The EmotioNL project has been carried out with support from the Research Foundation – Flanders (FWO). For any questions, please contact [email protected].</font>
|
483 |
|
484 |
<div style="display: flex"><img style="margin-right: 1em" alt="LT3 logo" src="https://lt3.ugent.be/static/images/logo_v2_single.png" width="136" height="58"> <img style="margin-right: 1em" alt="FWO logo" src="https://www.fwo.be/images/logo_desktop.png" height="58"></div>
|
485 |
""")
|
486 |
+
with gr.Column(scale=1, min_width=50):
|
487 |
gr.Markdown("""
|
488 |
""")
|
489 |
demo.launch()
|