Spaces:
Runtime error
Runtime error
iteration
Browse files
app.py
CHANGED
@@ -10,14 +10,14 @@ defaultTxt = "I hate you cancerous insects so much"
|
|
10 |
txt = st.text_area("Text to analyze", defaultTxt)
|
11 |
|
12 |
# Load tokenizer and model weights, try to default to RoBERTa.
|
13 |
-
|
14 |
-
case
|
15 |
tokenizerPath = "s-nlp/roberta_toxicity_classifier"
|
16 |
modelPath = "s-nlp/roberta_toxicity_classifier"
|
17 |
-
case
|
18 |
tokenizerPath = "citizenlab/distilbert-base-multilingual-cased-toxicity"
|
19 |
modelPath = "citizenlab/distilbert-base-multilingual-cased-toxicity"
|
20 |
-
case
|
21 |
tokenizerPath = "unitary/multilingual-toxic-xlm-roberta"
|
22 |
modelPath = "unitary/multilingual-toxic-xlm-roberta"
|
23 |
case _:
|
|
|
10 |
txt = st.text_area("Text to analyze", defaultTxt)
|
11 |
|
12 |
# Load tokenizer and model weights, try to default to RoBERTa.
|
13 |
+
matcho option:
|
14 |
+
case RoBERTa:
|
15 |
tokenizerPath = "s-nlp/roberta_toxicity_classifier"
|
16 |
modelPath = "s-nlp/roberta_toxicity_classifier"
|
17 |
+
case DistilBERT:
|
18 |
tokenizerPath = "citizenlab/distilbert-base-multilingual-cased-toxicity"
|
19 |
modelPath = "citizenlab/distilbert-base-multilingual-cased-toxicity"
|
20 |
+
case XLM-RoBERTa:
|
21 |
tokenizerPath = "unitary/multilingual-toxic-xlm-roberta"
|
22 |
modelPath = "unitary/multilingual-toxic-xlm-roberta"
|
23 |
case _:
|