Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -5,6 +5,7 @@ from evaluate.utils import launch_gradio_widget
|
|
5 |
import gradio as gr
|
6 |
import torch
|
7 |
import classify
|
|
|
8 |
from whisper.tokenizer import get_tokenizer
|
9 |
from speechbrain.pretrained.interfaces import foreign_class
|
10 |
from transformers import AutoModelForSequenceClassification, pipeline, WhisperTokenizer, RobertaForSequenceClassification, RobertaTokenizer, AutoTokenizer
|
@@ -97,7 +98,7 @@ def classify_toxicity(audio_file, text_input, classify_anxiety):
|
|
97 |
model = "whisper-large"
|
98 |
|
99 |
internal_lm_average_logprobs = classify.calculate_internal_lm_average_logprobs(
|
100 |
-
model=
|
101 |
class_names=class_names,
|
102 |
# class_names=classify_anxiety,
|
103 |
tokenizer=tokenizer,
|
|
|
5 |
import gradio as gr
|
6 |
import torch
|
7 |
import classify
|
8 |
+
from whisper.model import Whisper
|
9 |
from whisper.tokenizer import get_tokenizer
|
10 |
from speechbrain.pretrained.interfaces import foreign_class
|
11 |
from transformers import AutoModelForSequenceClassification, pipeline, WhisperTokenizer, RobertaForSequenceClassification, RobertaTokenizer, AutoTokenizer
|
|
|
98 |
model = "whisper-large"
|
99 |
|
100 |
internal_lm_average_logprobs = classify.calculate_internal_lm_average_logprobs(
|
101 |
+
model=Whisper,
|
102 |
class_names=class_names,
|
103 |
# class_names=classify_anxiety,
|
104 |
tokenizer=tokenizer,
|