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