Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -88,9 +88,11 @@ def classify_toxicity(audio_file, text_input, classify_anxiety, emo_class, expli
|
|
88 |
# classification_output = classifier(sequence_to_classify, candidate_labels, multi_label=False)
|
89 |
classification_output = text_classifier(sequence_to_classify, candidate_labels, multi_label=True)
|
90 |
print("class output ", type(classification_output))
|
|
|
|
|
91 |
|
92 |
|
93 |
-
return toxicity_score,
|
94 |
# return f"Toxicity Score ({available_models[selected_model]}): {toxicity_score:.4f}"
|
95 |
else:
|
96 |
model = whisper.load_model("large")
|
|
|
88 |
# classification_output = classifier(sequence_to_classify, candidate_labels, multi_label=False)
|
89 |
classification_output = text_classifier(sequence_to_classify, candidate_labels, multi_label=True)
|
90 |
print("class output ", type(classification_output))
|
91 |
+
classification_df = pd.DataFrame.from_dict(classification_output)
|
92 |
+
print("df ", classification_df)
|
93 |
|
94 |
|
95 |
+
return toxicity_score, classification_df, transcribed_text
|
96 |
# return f"Toxicity Score ({available_models[selected_model]}): {toxicity_score:.4f}"
|
97 |
else:
|
98 |
model = whisper.load_model("large")
|