suusuu93 commited on
Commit
3f24c8c
Β·
verified Β·
1 Parent(s): 049f3d0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -3
app.py CHANGED
@@ -1,11 +1,19 @@
1
  import gradio as gr
 
 
 
 
 
 
 
2
  from transformers import pipeline
3
 
4
- # 1. Whisper ASR
5
  asr = pipeline("automatic-speech-recognition", model="openai/whisper-small")
6
 
7
- # 2. Emotion classifier (Vietnamese)
8
- emo_clf = pipeline("text-classification", model="bkai-foundation-models/vietnamese-emotion", top_k=None)
 
9
 
10
  # 3. Function to process audio
11
  def predict_emotion(audio_file):
 
1
  import gradio as gr
2
+ # from transformers import pipeline
3
+
4
+ # # 1. Whisper ASR
5
+ # asr = pipeline("automatic-speech-recognition", model="openai/whisper-small")
6
+
7
+ # # 2. Emotion classifier (Vietnamese)
8
+ # emo_clf = pipeline("text-classification", model="bkai-foundation-models/vietnamese-emotion", top_k=None)
9
  from transformers import pipeline
10
 
11
+ # ASR bαΊ±ng Whisper
12
  asr = pipeline("automatic-speech-recognition", model="openai/whisper-small")
13
 
14
+ # Emotion classification (Vietnamese text)
15
+ emo_clf = pipeline("text-classification", model="visolex/bartpho-emotion", top_k=None)
16
+
17
 
18
  # 3. Function to process audio
19
  def predict_emotion(audio_file):