Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -119,7 +119,8 @@ def classify_toxicity(audio_file, classify_anxiety, emo_class, explitive_selecti
|
|
119 |
print("k keys: ", k)
|
120 |
maxval = label_score_dict[k]
|
121 |
print("max value: ", maxval)
|
122 |
-
|
|
|
123 |
if maxval > threshold:
|
124 |
print("Toxic")
|
125 |
affirm = positive_affirmations()
|
@@ -129,6 +130,7 @@ def classify_toxicity(audio_file, classify_anxiety, emo_class, explitive_selecti
|
|
129 |
affirm = ""
|
130 |
topScore = maxval
|
131 |
else:
|
|
|
132 |
if toxicity_score > threshold:
|
133 |
affirm = positive_affirmations()
|
134 |
topScore = toxicity_score
|
|
|
119 |
print("k keys: ", k)
|
120 |
maxval = label_score_dict[k]
|
121 |
print("max value: ", maxval)
|
122 |
+
topScore = []
|
123 |
+
if maxval > threshold:
|
124 |
if maxval > threshold:
|
125 |
print("Toxic")
|
126 |
affirm = positive_affirmations()
|
|
|
130 |
affirm = ""
|
131 |
topScore = maxval
|
132 |
else:
|
133 |
+
topScore = []
|
134 |
if toxicity_score > threshold:
|
135 |
affirm = positive_affirmations()
|
136 |
topScore = toxicity_score
|