Update app.py
Browse files
app.py
CHANGED
@@ -28,7 +28,7 @@ import speech_recognition as speech_r
|
|
28 |
from jiwer import wer
|
29 |
import time
|
30 |
|
31 |
-
@st.
|
32 |
def load_model(model):
|
33 |
path = 'lightning_logs/version_0/checkpoints/' + str(model)
|
34 |
onnx_model = onnx.load(path)
|
@@ -407,15 +407,15 @@ if st.button('Сгенерировать потери'):
|
|
407 |
df_1['WER'] = WER_mass
|
408 |
|
409 |
st.dataframe(df_1, column_config={
|
410 |
-
"PESQ": st.column_config.
|
411 |
help="Перцептивная оценка качества речи - https://ieeexplore.ieee.org/document/941023"),
|
412 |
-
"STOI": st.column_config.
|
413 |
help="Индекс объективной кратковременной разборчивости - https://ieeexplore.ieee.org/document/5495701"),
|
414 |
-
"PLCMOSv1": st.column_config.
|
415 |
help="Эталонная метрика PLCMOS - https://arxiv.org/abs/2305.15127"),
|
416 |
-
"PLCMOSv2": st.column_config.
|
417 |
help="Неэталонная метрика PLCMOS - https://arxiv.org/abs/2305.15127"),
|
418 |
-
"WER": st.column_config.
|
419 |
help="Процент нераспознанных слов - https://deepgram.com/learn/what-is-word-error-rate")})
|
420 |
|
421 |
st.bar_chart(df_1, x="Audio", y="PESQ")
|
@@ -427,7 +427,7 @@ if st.button('Сгенерировать потери'):
|
|
427 |
|
428 |
col1, col2, col3, col4, col5 = st.columns(5)
|
429 |
col1.metric("PESQ", value = psq_mas[-1], delta = psq_mas[-1] - psq_mas[-2])
|
430 |
-
col2.metric("STOI", value = stoi_mass[-1], delta = stoi_mass[-1] - stoi_mass[-2]
|
431 |
col3.metric("PLCMOSv1", value = PLC_massv1[-1], delta = PLC_massv1[-1] - PLC_massv1[-2])
|
432 |
col4.metric("PLCMOSv2", value = PLC_massv2[-1], delta = PLC_massv2[-1] - PLC_massv2[-2])
|
433 |
col5.metric("WER", value = WER_mass[-1], delta = WER_mass[-1] - WER_mass[-2], delta_color="inverse")
|
|
|
28 |
from jiwer import wer
|
29 |
import time
|
30 |
|
31 |
+
@st.cache
|
32 |
def load_model(model):
|
33 |
path = 'lightning_logs/version_0/checkpoints/' + str(model)
|
34 |
onnx_model = onnx.load(path)
|
|
|
407 |
df_1['WER'] = WER_mass
|
408 |
|
409 |
st.dataframe(df_1, column_config={
|
410 |
+
"PESQ": st.column_config.Column("PESQ",
|
411 |
help="Перцептивная оценка качества речи - https://ieeexplore.ieee.org/document/941023"),
|
412 |
+
"STOI": st.column_config.Column("STOI",
|
413 |
help="Индекс объективной кратковременной разборчивости - https://ieeexplore.ieee.org/document/5495701"),
|
414 |
+
"PLCMOSv1": st.column_config.Column("PLCMOSv1",
|
415 |
help="Эталонная метрика PLCMOS - https://arxiv.org/abs/2305.15127"),
|
416 |
+
"PLCMOSv2": st.column_config.Column("PLCMOSv2",
|
417 |
help="Неэталонная метрика PLCMOS - https://arxiv.org/abs/2305.15127"),
|
418 |
+
"WER": st.column_config.Column("WER",
|
419 |
help="Процент нераспознанных слов - https://deepgram.com/learn/what-is-word-error-rate")})
|
420 |
|
421 |
st.bar_chart(df_1, x="Audio", y="PESQ")
|
|
|
427 |
|
428 |
col1, col2, col3, col4, col5 = st.columns(5)
|
429 |
col1.metric("PESQ", value = psq_mas[-1], delta = psq_mas[-1] - psq_mas[-2])
|
430 |
+
col2.metric("STOI", value = stoi_mass[-1], delta = stoi_mass[-1] - stoi_mass[-2])
|
431 |
col3.metric("PLCMOSv1", value = PLC_massv1[-1], delta = PLC_massv1[-1] - PLC_massv1[-2])
|
432 |
col4.metric("PLCMOSv2", value = PLC_massv2[-1], delta = PLC_massv2[-1] - PLC_massv2[-2])
|
433 |
col5.metric("WER", value = WER_mass[-1], delta = WER_mass[-1] - WER_mass[-2], delta_color="inverse")
|