Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -20,7 +20,8 @@ def classify_toxicity(audio_file, text_file, selected_model):
|
|
| 20 |
# Extract the transcribed text
|
| 21 |
transcribed_text = transcription_results["transcription"]
|
| 22 |
else:
|
| 23 |
-
|
|
|
|
| 24 |
|
| 25 |
# Load the selected toxicity classification model
|
| 26 |
toxicity_module = evaluate.load("toxicity", selected_model)
|
|
|
|
| 20 |
# Extract the transcribed text
|
| 21 |
transcribed_text = transcription_results["transcription"]
|
| 22 |
else:
|
| 23 |
+
with open(text_file, "r") as f:
|
| 24 |
+
transcribed_text = f
|
| 25 |
|
| 26 |
# Load the selected toxicity classification model
|
| 27 |
toxicity_module = evaluate.load("toxicity", selected_model)
|