JulianHame commited on
Commit
b5f0ee1
1 Parent(s): f6fe135

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -12,14 +12,14 @@ selection = "N/A"
12
  with col1:
13
  selection = st.radio("Pick one of the four pre-trained models below:",
14
  key = "modelChoice",
15
- options = ["DistilBERT", "FinBERT", "SiEBERT", "Twitter-roBERTa"],
16
  )
17
 
18
  pipe = pipeline('sentiment-analysis')
19
  if selection == "DistilBERT":
20
  pipe = pipeline(model = "distilbert-base-uncased-finetuned-sst-2-english")
21
- if selection == "FinBERT":
22
- pipe = pipeline(model = "yiyanghkust/finbert-tone")
23
  if selection == "Twitter-roBERTa":
24
  pipe = pipeline(model = "cardiffnlp/twitter-roberta-base-sentiment-latest")
25
  if selection == "SiEBERT":
@@ -27,7 +27,7 @@ if selection == "SiEBERT":
27
 
28
  with col2:
29
  st.caption('DistilBERT - One of the most popular and widely-used language models. Labels text as POSITIVE or NEGATIVE. Developed by Hugging Face.')
30
- st.caption('FinBERT - A finance-oriented model trained with analysis reports. Labels text as POSITIVE, NEGATIVE or NEUTRAL. Developed by yiyanghkust.')
31
  st.caption('SiEBERT - A model trained on diverse text sources to improve generalization. Labels text as POSITIVE or NEGATIVE. Developed by siebert.')
32
  st.caption('Twitter-roBERTa - A model trained on over 124M tweets. Labels text as POSITIVE, NEGATIVE or NEUTRAL. Developed by cardiffnlp.')
33
 
 
12
  with col1:
13
  selection = st.radio("Pick one of the four pre-trained models below:",
14
  key = "modelChoice",
15
+ options = ["DistilBERT", "Toxicity-Classifier", "SiEBERT", "Twitter-roBERTa"],
16
  )
17
 
18
  pipe = pipeline('sentiment-analysis')
19
  if selection == "DistilBERT":
20
  pipe = pipeline(model = "distilbert-base-uncased-finetuned-sst-2-english")
21
+ if selection == "Toxicity-Classifier":
22
+ pipe = pipeline(model = "JulianHame/toxicity-classifier")
23
  if selection == "Twitter-roBERTa":
24
  pipe = pipeline(model = "cardiffnlp/twitter-roberta-base-sentiment-latest")
25
  if selection == "SiEBERT":
 
27
 
28
  with col2:
29
  st.caption('DistilBERT - One of the most popular and widely-used language models. Labels text as POSITIVE or NEGATIVE. Developed by Hugging Face.')
30
+ st.caption('Toxicity-Classifier - A model trained to classify tweets under different toxicity-related categories.')
31
  st.caption('SiEBERT - A model trained on diverse text sources to improve generalization. Labels text as POSITIVE or NEGATIVE. Developed by siebert.')
32
  st.caption('Twitter-roBERTa - A model trained on over 124M tweets. Labels text as POSITIVE, NEGATIVE or NEUTRAL. Developed by cardiffnlp.')
33