Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -65,15 +65,11 @@ def slider_logic(slider):
|
|
| 65 |
return threshold
|
| 66 |
|
| 67 |
# Create a Gradio interface with audio file and text inputs
|
| 68 |
-
def classify_toxicity(audio_file,
|
|
|
|
| 69 |
# Transcribe the audio file using Whisper ASR
|
| 70 |
-
|
| 71 |
-
|
| 72 |
-
else:
|
| 73 |
-
transcribed_text = text_input
|
| 74 |
-
|
| 75 |
-
print("emo_class ", emo_class, "explitive select", explitive_selection)
|
| 76 |
-
|
| 77 |
## SLIDER ##
|
| 78 |
threshold = slider_logic(slider)
|
| 79 |
|
|
|
|
| 65 |
return threshold
|
| 66 |
|
| 67 |
# Create a Gradio interface with audio file and text inputs
|
| 68 |
+
def classify_toxicity(audio_file, classify_anxiety, emo_class, explitive_selection, slider):
|
| 69 |
+
|
| 70 |
# Transcribe the audio file using Whisper ASR
|
| 71 |
+
transcribed_text = pipe(audio_file)["text"]
|
| 72 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 73 |
## SLIDER ##
|
| 74 |
threshold = slider_logic(slider)
|
| 75 |
|