kowsiknd commited on
Commit
924d16d
·
1 Parent(s): 177ae24
Files changed (1) hide show
  1. app.py +10 -7
app.py CHANGED
@@ -6,10 +6,12 @@ st.title("Twitter Sentiment Analysis using BERT model")
6
 
7
  st.subheader("Motivation")
8
  st.markdown("""
9
- Cyberbullying is a serious problem in today's world. It is a form of bullying that takes place using electronic technology. This model will act as an tool for the detection of the abusive content
10
- in the tweets. This model can be used by the social media platforms to detect the abusive content in the tweets and take necessary action.
 
 
11
 
12
- Huggingface provides an easy interfce to test the models before the use.
13
  """)
14
 
15
  st.subheader("Play with the model")
@@ -27,13 +29,14 @@ Model was trained on twitter dataset ENCASEH2020 from Founta, A.M et. al. (2018)
27
  giving better result with least number of parameters. The model was trained for 10 epochs with batch size of 32 and AdamW optimizer with learning rate of 1e-2 and loss as cross entropy.
28
  """)
29
 
30
- st.image("./images/train_val_accuracy.png", caption="Train and Validation Accuracy", use_column_width=True)
31
- st.image("./images/train_test_scores.png", caption="Classification Report", use_column_width=True)
32
- st.image("./images/confusion_matrix.png", caption="Confusion Matrix", use_column_width=True)
33
 
34
  st.subheader("References")
35
  st.markdown("1. [BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding](https://arxiv.org/abs/1810.04805)")
36
  st.markdown("2. [BERT-Tiny: A Tiny BERT for Natural Language Understanding](https://arxiv.org/abs/1909.10351)")
37
  st.markdown("3. [Founta, A.M., Djouvas, C., Chatzakou, D., Leontiadis, I., Blackburn, J., Stringhini, G., Vakali, A., Sirivianos, M., & Kourtellis, N. (2018).Large Scale Crowdsourcing and Characterization of Twitter Abusive Behavior. In 11th International Conference on Web and Social Media, ICWSM 2018.](https://arxiv.org/abs/1802.00393)")
38
  st.markdown("4. [Ajay S, Ram, Kowsik N D, Navaneeth D, Amarnath C N, Cyberbullying Detection using Bidirectional Encoder Representation from Transformers 2022](https://github.com/Cubemet/bert-models)")
39
- st.markdown("5. [Base Model from nreimers](https://huggingface.co/nreimers/BERT-Tiny_L-2_H-128_A-2)")
 
 
6
 
7
  st.subheader("Motivation")
8
  st.markdown("""
9
+ Social media has significantly shortened the digital world making it easy for fake news to spread like wildfire.
10
+ According to official reports, 36.7 percent [6] of the total population have felt that they are being cyberbullied in their lifetime.
11
+ Since the level of offensiveness is subjective, conventional sentiment analysis might not do a perfect job in classifying them.
12
+ A way to get around this is to use significantly large and diverse Deep Learning datasets that can generalize the model.
13
 
14
+ Huggingface spaces provides an easy interfce to test the models before the use. Also, share the models with ease.
15
  """)
16
 
17
  st.subheader("Play with the model")
 
29
  giving better result with least number of parameters. The model was trained for 10 epochs with batch size of 32 and AdamW optimizer with learning rate of 1e-2 and loss as cross entropy.
30
  """)
31
 
32
+ st.image("./images/train_val_accuracy.png", caption="Train and validation Accuracy - On an average we are getting 96 percent accuracy", use_column_width=True)
33
+ st.image("./images/train_test_scores.png", caption="Classification Report - We are getting F1 score of 0.96 for both the classes", use_column_width=True)
34
+ st.image("./images/confusion_matrix.png", caption="Confusion Matrix - Only 217 datapoints are mis-classified from 5430 data points in the test dataset", use_column_width=True)
35
 
36
  st.subheader("References")
37
  st.markdown("1. [BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding](https://arxiv.org/abs/1810.04805)")
38
  st.markdown("2. [BERT-Tiny: A Tiny BERT for Natural Language Understanding](https://arxiv.org/abs/1909.10351)")
39
  st.markdown("3. [Founta, A.M., Djouvas, C., Chatzakou, D., Leontiadis, I., Blackburn, J., Stringhini, G., Vakali, A., Sirivianos, M., & Kourtellis, N. (2018).Large Scale Crowdsourcing and Characterization of Twitter Abusive Behavior. In 11th International Conference on Web and Social Media, ICWSM 2018.](https://arxiv.org/abs/1802.00393)")
40
  st.markdown("4. [Ajay S, Ram, Kowsik N D, Navaneeth D, Amarnath C N, Cyberbullying Detection using Bidirectional Encoder Representation from Transformers 2022](https://github.com/Cubemet/bert-models)")
41
+ st.markdown("5. [Base Model from nreimers](https://huggingface.co/nreimers/BERT-Tiny_L-2_H-128_A-2)")
42
+ st.markdown("6. [IHPL, Cyberbullying, a Growing Public Health Concern (Aug 2018)](https://ihpl.llu.edu/blog/cyberbullying-growing-public-health-concern)")