mskov commited on
Commit
87e9ad0
1 Parent(s): 187b547

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
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=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,