Spaces:
Runtime error
Runtime error
FpOliveira
commited on
Commit
•
97c05f1
1
Parent(s):
c2dd502
Update app.py
Browse files
app.py
CHANGED
@@ -9,14 +9,15 @@ import plotly.express as px
|
|
9 |
article_string = "Author: <a href=\"https://huggingface.co/FpOliveira\">Felipe Ramos de Oliveira</a>. Read more about our <a href=\"https://github.com/Silly-Machine/TuPi-Portuguese-Hate-Speech-Dataset\">The Portuguese hate speech dataset (TuPI) </a>."
|
10 |
|
11 |
# App title
|
12 |
-
app_title = "Portuguese hate speech
|
13 |
|
14 |
# App description
|
15 |
app_description = """
|
16 |
-
EN: This application employs multiple models to identify hate speech in
|
17 |
-
\nPT: Esta aplicativo emprega múltiplos modelos para identificar
|
18 |
"""
|
19 |
|
|
|
20 |
# App examples
|
21 |
app_examples = [
|
22 |
["bom dia flor do dia!!!"],
|
@@ -63,12 +64,13 @@ hate_speech_categories = {
|
|
63 |
model_list = [
|
64 |
"FpOliveira/tupi-bert-large-portuguese-cased-multiclass-multilabel",
|
65 |
"FpOliveira/tupi-bert-base-portuguese-cased-multiclass-multilabel",
|
66 |
-
|
67 |
|
68 |
# User-friendly names for models
|
69 |
user_friendly_name = {
|
70 |
"FpOliveira/tupi-bert-large-portuguese-cased-multiclass-multilabel": "BERTimbau large (TuPi)",
|
71 |
"FpOliveira/tupi-bert-base-portuguese-cased-multiclass-multilabel": "BERTimbau base (TuPi)",
|
|
|
72 |
}
|
73 |
|
74 |
# Reverse mapping for user-friendly names
|
|
|
9 |
article_string = "Author: <a href=\"https://huggingface.co/FpOliveira\">Felipe Ramos de Oliveira</a>. Read more about our <a href=\"https://github.com/Silly-Machine/TuPi-Portuguese-Hate-Speech-Dataset\">The Portuguese hate speech dataset (TuPI) </a>."
|
10 |
|
11 |
# App title
|
12 |
+
app_title = "Portuguese hate speech identifier (Multiclass) - Identificador de discurso de ódio em português (Multiclasse)"
|
13 |
|
14 |
# App description
|
15 |
app_description = """
|
16 |
+
EN: This application employs multiple natural language models to identify different types of hate speech in portuguese. You have the option to enter your own phrases by filling in the "Text" field or choosing one of the examples provided below.
|
17 |
+
\nPT: Esta aplicativo emprega múltiplos modelos de linguagem natural para identificar difentes tipos de discuros de odio em português. Você tem a opção de inserir suas próprias frases preenchendo o campo "Text" ou escolhendo um dos exemplos abaixo
|
18 |
"""
|
19 |
|
20 |
+
|
21 |
# App examples
|
22 |
app_examples = [
|
23 |
["bom dia flor do dia!!!"],
|
|
|
64 |
model_list = [
|
65 |
"FpOliveira/tupi-bert-large-portuguese-cased-multiclass-multilabel",
|
66 |
"FpOliveira/tupi-bert-base-portuguese-cased-multiclass-multilabel",
|
67 |
+
"FpOliveira/tupi-gpt2-small-multiclass-multilabel",
|
68 |
|
69 |
# User-friendly names for models
|
70 |
user_friendly_name = {
|
71 |
"FpOliveira/tupi-bert-large-portuguese-cased-multiclass-multilabel": "BERTimbau large (TuPi)",
|
72 |
"FpOliveira/tupi-bert-base-portuguese-cased-multiclass-multilabel": "BERTimbau base (TuPi)",
|
73 |
+
"FpOliveira/tupi-gpt2-small-multiclass-multilabel":"GPT2 small (TuPi)"
|
74 |
}
|
75 |
|
76 |
# Reverse mapping for user-friendly names
|