Spaces:
Runtime error
Runtime error
MaxBrodeurUrbas
commited on
Commit
·
4430f3f
1
Parent(s):
1267293
removing the general toxicity label
Browse files
app.py
CHANGED
@@ -80,6 +80,8 @@ def predict(audio_file_path):
|
|
80 |
if float(sentiment_conf) > 0.01:
|
81 |
detected_toxicity = True
|
82 |
sentiment_confs[sentiment_labels[s]] = sentiment_conf
|
|
|
|
|
83 |
|
84 |
if detected_toxicity:
|
85 |
sentiment_confs['Not Toxic'] = "0.0"
|
|
|
80 |
if float(sentiment_conf) > 0.01:
|
81 |
detected_toxicity = True
|
82 |
sentiment_confs[sentiment_labels[s]] = sentiment_conf
|
83 |
+
|
84 |
+
del sentiment_confs['Toxic']
|
85 |
|
86 |
if detected_toxicity:
|
87 |
sentiment_confs['Not Toxic'] = "0.0"
|