Spaces:
Runtime error
Runtime error
Commit
·
ddab9eb
1
Parent(s):
f488509
Update app.py
Browse files
app.py
CHANGED
|
@@ -16,6 +16,7 @@ device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")
|
|
| 16 |
emotion_classifier = pipeline("text-classification",model='bhadresh-savani/distilbert-base-uncased-emotion')
|
| 17 |
|
| 18 |
def translate(audio):
|
|
|
|
| 19 |
print("""
|
| 20 |
—
|
| 21 |
Sending audio to Whisper ...
|
|
@@ -42,12 +43,12 @@ def translate(audio):
|
|
| 42 |
|
| 43 |
with gr.Blocks() as demo:
|
| 44 |
gr.Markdown("""
|
| 45 |
-
|
| 46 |
-
|
| 47 |
""")
|
| 48 |
|
| 49 |
with gr.Row():
|
| 50 |
with gr.Column():
|
|
|
|
| 51 |
audio_input = gr.Audio(label = 'Record Audio Input',source="microphone",type="filepath")
|
| 52 |
with gr.Row():
|
| 53 |
transcribe_audio = gr.Button('Transcribe')
|
|
|
|
| 16 |
emotion_classifier = pipeline("text-classification",model='bhadresh-savani/distilbert-base-uncased-emotion')
|
| 17 |
|
| 18 |
def translate(audio):
|
| 19 |
+
|
| 20 |
print("""
|
| 21 |
—
|
| 22 |
Sending audio to Whisper ...
|
|
|
|
| 43 |
|
| 44 |
with gr.Blocks() as demo:
|
| 45 |
gr.Markdown("""
|
| 46 |
+
## Emotion Detection From Speech with Whisper
|
|
|
|
| 47 |
""")
|
| 48 |
|
| 49 |
with gr.Row():
|
| 50 |
with gr.Column():
|
| 51 |
+
gr.Markdown(""" ### Record audio """)
|
| 52 |
audio_input = gr.Audio(label = 'Record Audio Input',source="microphone",type="filepath")
|
| 53 |
with gr.Row():
|
| 54 |
transcribe_audio = gr.Button('Transcribe')
|