Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -26,8 +26,8 @@ def classify_toxicity(audio_file, text_input, selected_model):
|
|
26 |
transcribed_text = text_input
|
27 |
|
28 |
# Load the selected toxicity classification model
|
29 |
-
|
30 |
-
toxicity_module = evaluate.load("toxicity", 'DaNLP/da-electra-hatespeech-detection', module_type="measurement")
|
31 |
|
32 |
toxicity_results = toxicity_module.compute(predictions=[transcribed_text])
|
33 |
|
|
|
26 |
transcribed_text = text_input
|
27 |
|
28 |
# Load the selected toxicity classification model
|
29 |
+
toxicity_module = evaluate.load("toxicity", selected_model)
|
30 |
+
#toxicity_module = evaluate.load("toxicity", 'DaNLP/da-electra-hatespeech-detection', module_type="measurement")
|
31 |
|
32 |
toxicity_results = toxicity_module.compute(predictions=[transcribed_text])
|
33 |
|