mskov commited on
Commit
e7cf2e7
1 Parent(s): fd26334

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +15 -14
app.py CHANGED
@@ -49,20 +49,21 @@ def classify_emotion(audio):
49
  return emo_dict[text_lab[0]]
50
 
51
  def slider_logic(slider):
52
- if slider == 1:
53
- theshold = .98
54
- elif slider == 2:
55
- threshold = .88
56
- elif slider == 3:
57
- threshold = .77
58
- elif slider == 4:
59
- threshold = .66
60
- elif slider == 5:
61
- threshold = .55
62
- else:
63
- threshold = []
64
- return threshold
65
-
 
66
  # Create a Gradio interface with audio file and text inputs
67
  def classify_toxicity(audio_file, text_input, classify_anxiety, emo_class, explitive_selection, slider):
68
  # Transcribe the audio file using Whisper ASR
 
49
  return emo_dict[text_lab[0]]
50
 
51
  def slider_logic(slider):
52
+ threshold = 0
53
+ if slider == 1:
54
+ threshold = .98
55
+ elif slider == 2:
56
+ threshold = .88
57
+ elif slider == 3:
58
+ threshold = .77
59
+ elif slider == 4:
60
+ threshold = .66
61
+ elif slider == 5:
62
+ threshold = .55
63
+ else:
64
+ threshold = []
65
+ return threshold
66
+
67
  # Create a Gradio interface with audio file and text inputs
68
  def classify_toxicity(audio_file, text_input, classify_anxiety, emo_class, explitive_selection, slider):
69
  # Transcribe the audio file using Whisper ASR