mskov commited on
Commit
585a1e8
·
1 Parent(s): 4fe2d64

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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, WhisperForConditionalGeneration, pipeline, RobertaForSequenceClassification, RobertaTokenizer, AutoTokenizer
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 = WhisperForConditionalGeneration.from_pretrained("openai/whisper-base")
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 ####