Spaces:
Sleeping
Sleeping
Commit ·
502fc28
1
Parent(s): 9b398a2
Update app.py
Browse files
app.py
CHANGED
|
@@ -5,7 +5,7 @@ import librosa as lr
|
|
| 5 |
import torch
|
| 6 |
import torch.nn as nn
|
| 7 |
import pytorch_lightning as pl
|
| 8 |
-
import gradio
|
| 9 |
from model import MFCC_CNN
|
| 10 |
|
| 11 |
EMOTIONS = {
|
|
@@ -69,7 +69,7 @@ def processAudio(audio_file):
|
|
| 69 |
|
| 70 |
return EMOTIONS[prediction.item()]
|
| 71 |
|
| 72 |
-
demo =
|
| 73 |
fn=processAudio,
|
| 74 |
inputs=gr.Audio(),
|
| 75 |
outputs=gr.Lable(),
|
|
|
|
| 5 |
import torch
|
| 6 |
import torch.nn as nn
|
| 7 |
import pytorch_lightning as pl
|
| 8 |
+
import gradio as gr
|
| 9 |
from model import MFCC_CNN
|
| 10 |
|
| 11 |
EMOTIONS = {
|
|
|
|
| 69 |
|
| 70 |
return EMOTIONS[prediction.item()]
|
| 71 |
|
| 72 |
+
demo = gr.Interface(
|
| 73 |
fn=processAudio,
|
| 74 |
inputs=gr.Audio(),
|
| 75 |
outputs=gr.Lable(),
|