nppmatt commited on
Commit
c125d59
1 Parent(s): 9a8f76b

remove extra tabs

Browse files
Files changed (1) hide show
  1. app.py +8 -8
app.py CHANGED
@@ -13,17 +13,17 @@ txt = st.text_area("Text to analyze", defaultTxt)
13
  # Huggingface does not support Python 3.10 match statements and I'm too lazy to implement an equivalent.
14
 
15
  if (option == "RoBERTa"):
16
- tokenizerPath = "s-nlp/roberta_toxicity_classifier"
17
- modelPath = "s-nlp/roberta_toxicity_classifier"
18
  elif (option == "DistilBERT"):
19
- tokenizerPath = "citizenlab/distilbert-base-multilingual-cased-toxicity"
20
- modelPath = "citizenlab/distilbert-base-multilingual-cased-toxicity"
21
  elif (option == "XLM-RoBERTa"):
22
- tokenizerPath = "unitary/multilingual-toxic-xlm-roberta"
23
- modelPath = "unitary/multilingual-toxic-xlm-roberta"
24
  else:
25
- tokenizerPath = "s-nlp/roberta_toxicity_classifier"
26
- modelPath = "s-nlp/roberta_toxicity_classifier"
27
 
28
  tokenizer = AutoTokenizer.from_pretrained(tokenizerPath)
29
  model = AutoModelForSequenceClassification.from_pretrained(modelPath)
 
13
  # Huggingface does not support Python 3.10 match statements and I'm too lazy to implement an equivalent.
14
 
15
  if (option == "RoBERTa"):
16
+ tokenizerPath = "s-nlp/roberta_toxicity_classifier"
17
+ modelPath = "s-nlp/roberta_toxicity_classifier"
18
  elif (option == "DistilBERT"):
19
+ tokenizerPath = "citizenlab/distilbert-base-multilingual-cased-toxicity"
20
+ modelPath = "citizenlab/distilbert-base-multilingual-cased-toxicity"
21
  elif (option == "XLM-RoBERTa"):
22
+ tokenizerPath = "unitary/multilingual-toxic-xlm-roberta"
23
+ modelPath = "unitary/multilingual-toxic-xlm-roberta"
24
  else:
25
+ tokenizerPath = "s-nlp/roberta_toxicity_classifier"
26
+ modelPath = "s-nlp/roberta_toxicity_classifier"
27
 
28
  tokenizer = AutoTokenizer.from_pretrained(tokenizerPath)
29
  model = AutoModelForSequenceClassification.from_pretrained(modelPath)