AyoubChLin commited on
Commit
3c68be5
·
verified ·
1 Parent(s): 6274b00

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -6
app.py CHANGED
@@ -99,12 +99,11 @@ def main():
99
  # Convert the list to a numpy array
100
  arr = np.array(prediction[0])
101
  max_index = np.argmax(arr)
102
-
103
- st.success("class"+str(max_index))
104
- #if prediction > 0.5:
105
- # st.error("Hate Speech Detected")
106
- #else:
107
- # st.success("No Hate Speech Detected")
108
  else:
109
  st.warning("Please enter some text")
110
 
 
99
  # Convert the list to a numpy array
100
  arr = np.array(prediction[0])
101
  max_index = np.argmax(arr)
102
+ if max_index == 1:
103
+ #negative
104
+ st.error("Hate Speech Detected")
105
+ else
106
+ st.success("No Hate Speech Detected")
 
107
  else:
108
  st.warning("Please enter some text")
109