Update app.py
Browse files
app.py
CHANGED
@@ -11,10 +11,21 @@ import onnxruntime, onnx
|
|
11 |
import matplotlib.pyplot as plt
|
12 |
from matplotlib.backends.backend_agg import FigureCanvasAgg as FigureCanvas
|
13 |
from pystoi import stoi
|
14 |
-
from pesq import pesq
|
15 |
import pandas as pd
|
16 |
import torchaudio
|
17 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
18 |
@st.cache
|
19 |
def load_model():
|
20 |
path = 'lightning_logs/version_0/checkpoints/frn.onnx'
|
|
|
11 |
import matplotlib.pyplot as plt
|
12 |
from matplotlib.backends.backend_agg import FigureCanvasAgg as FigureCanvas
|
13 |
from pystoi import stoi
|
14 |
+
#from pesq import pesq
|
15 |
import pandas as pd
|
16 |
import torchaudio
|
17 |
|
18 |
+
|
19 |
+
from torch_pesq import PesqLoss
|
20 |
+
|
21 |
+
pesq = PesqLoss(0.5,
|
22 |
+
sample_rate=44100,
|
23 |
+
)
|
24 |
+
|
25 |
+
mos = pesq.mos(reference, degraded)
|
26 |
+
loss = pesq(reference, degraded)
|
27 |
+
|
28 |
+
|
29 |
@st.cache
|
30 |
def load_model():
|
31 |
path = 'lightning_logs/version_0/checkpoints/frn.onnx'
|