Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -5,7 +5,7 @@ from evaluate.utils import launch_gradio_widget
|
|
5 |
import gradio as gr
|
6 |
import torch
|
7 |
from speechbrain.pretrained.interfaces import foreign_class
|
8 |
-
from transformers import AutoModelForSequenceClassification,
|
9 |
# pull in emotion detection
|
10 |
# --- Add element for specification
|
11 |
# pull in text classification
|
@@ -39,7 +39,7 @@ def classify_toxicity(audio_file, text_input, classify_anxiety):
|
|
39 |
# Extract the transcribed text
|
40 |
# transcribed_text = transcription_results["transcription"]
|
41 |
'''
|
42 |
-
model =
|
43 |
transcribed_text = model.transcribe(audio_file)
|
44 |
|
45 |
#### Emotion classification ####
|
|
|
5 |
import gradio as gr
|
6 |
import torch
|
7 |
from speechbrain.pretrained.interfaces import foreign_class
|
8 |
+
from transformers import AutoModelForSequenceClassification, pipeline, RobertaForSequenceClassification, RobertaTokenizer, AutoTokenizer
|
9 |
# pull in emotion detection
|
10 |
# --- Add element for specification
|
11 |
# pull in text classification
|
|
|
39 |
# Extract the transcribed text
|
40 |
# transcribed_text = transcription_results["transcription"]
|
41 |
'''
|
42 |
+
model = whisper.load_model("base")
|
43 |
transcribed_text = model.transcribe(audio_file)
|
44 |
|
45 |
#### Emotion classification ####
|