JulianHame commited on
Commit
b1da586
1 Parent(s): 080a024

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +23 -2
app.py CHANGED
@@ -52,5 +52,26 @@ if(identity_hate > highest_class_rating):
52
  st.write("---")
53
  st.write("Overall toxicity rating: " +str(toxicity))
54
  st.write("---")
55
- st.write("Highest toxicity class:" +str(highest_class))
56
- st.write("Rating: " +str(highest_class_rating))
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
52
  st.write("---")
53
  st.write("Overall toxicity rating: " +str(toxicity))
54
  st.write("---")
55
+ st.write("Classifications:")
56
+ if(toxicity_severe > 0.5)
57
+ st.write("Severely toxic - " +str(toxicity_severe))
58
+ if(obscene > 0.5)
59
+ st.write("Obscene - " +str(obscene))
60
+ if(threat > 0.5)
61
+ st.write("Threat - " +str(threat))
62
+ if(insult > 0.5)
63
+ st.write("Insult - " +str(insult))
64
+ if(identity_hate > 0.5)
65
+ st.write("Identity hate - " +str(identity_hate))
66
+ st.write("---")
67
+ st.write("Invalid classifications:")
68
+ if(toxicity_severe <= 0.5)
69
+ st.write("Severely toxic - " +str(toxicity_severe))
70
+ if(obscene <= 0.5)
71
+ st.write("Obscene - " +str(obscene))
72
+ if(threat <= 0.5)
73
+ st.write("Threat - " +str(threat))
74
+ if(insult <= 0.5)
75
+ st.write("Insult - " +str(insult))
76
+ if(identity_hate <= 0.5)
77
+ st.write("Identity hate - " +str(identity_hate))