Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -141,7 +141,7 @@ def predict_hate_speech(audio_path):
|
|
| 141 |
predicted_class = torch.argmax(probabilities, dim=1).item()
|
| 142 |
confidence = probabilities[0][predicted_class].item()
|
| 143 |
|
| 144 |
-
if confidence > 0.
|
| 145 |
result = {
|
| 146 |
"Classification": "Hate Speech",
|
| 147 |
"Confidence": confidence
|
|
|
|
| 141 |
predicted_class = torch.argmax(probabilities, dim=1).item()
|
| 142 |
confidence = probabilities[0][predicted_class].item()
|
| 143 |
|
| 144 |
+
if confidence > 0.6 and predicted_class == 1:
|
| 145 |
result = {
|
| 146 |
"Classification": "Hate Speech",
|
| 147 |
"Confidence": confidence
|