Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
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 |
|