Update app.py
Browse files
app.py
CHANGED
@@ -424,9 +424,9 @@ if st.button('Сгенерировать потери'):
|
|
424 |
error1 = wer(orig, orig)
|
425 |
error2 = wer(orig, lossy)
|
426 |
error3 = wer(orig, enhanced)
|
427 |
-
|
428 |
|
429 |
-
df_1['
|
430 |
|
431 |
st.subheader('4. Метрики аудио')
|
432 |
#st.dataframe(df_1)
|
@@ -436,7 +436,7 @@ if st.button('Сгенерировать потери'):
|
|
436 |
col2.metric("STOI", value = round(stoi_mass[0],3))
|
437 |
col3.metric("PLCMOSv1", value = round(PLC_massv1[0],3))
|
438 |
col4.metric("PLCMOSv2", value = round(PLC_massv2[0],3))
|
439 |
-
col5.metric("WAcc", value = round(
|
440 |
|
441 |
|
442 |
st.write("#### "+"С потерями")
|
@@ -445,7 +445,7 @@ if st.button('Сгенерировать потери'):
|
|
445 |
col2.metric("STOI", value = round(stoi_mass[1],3), delta = str(round(-(abs(stoi_mass[1] - stoi_mass[0]) / stoi_mass[0]) * 100.0,3))+'%')
|
446 |
col3.metric("PLCMOSv1", value = round(PLC_massv1[1],3), delta = str(round(-(abs(PLC_massv1[1] - PLC_massv1[0]) / PLC_massv1[0]) * 100.0,3))+'%')
|
447 |
col4.metric("PLCMOSv2", value = round(PLC_massv2[1],3), delta = str(round(-(abs(PLC_massv2[1] - PLC_massv2[0]) / PLC_massv2[0]) * 100.0,3))+'%')
|
448 |
-
col5.metric("WAcc", value = round(
|
449 |
|
450 |
|
451 |
st.write("#### "+"Улучшенное")
|
@@ -458,16 +458,16 @@ if st.button('Сгенерировать потери'):
|
|
458 |
col3.metric("PLCMOSv1", value = round(PLC_massv1[2],3), delta = PLCv1_s + str(round((abs(PLC_massv1[2] - PLC_massv1[1]) / PLC_massv1[1]) * 100.0,3))+'%')
|
459 |
PLCv2_s = sign_x_y(PLC_massv2[1], PLC_massv2[2])
|
460 |
col4.metric("PLCMOSv2", value = round(PLC_massv2[2],3), delta = PLCv2_s + str(round((abs(PLC_massv2[2] - PLC_massv2[1]) / PLC_massv2[1]) * 100.0,3))+'%')
|
461 |
-
WER_s = sign_x_y(
|
462 |
-
if
|
463 |
-
if
|
464 |
-
col5.metric("WAcc", value = round(
|
465 |
else:
|
466 |
-
col5.metric("WAcc", value = round(
|
467 |
else:
|
468 |
-
col5.metric("WAcc", value = round(
|
469 |
|
470 |
-
tab1, tab2, tab3, tab4, tab5 = st.tabs(["PESQ", "STOI", "PLCMOSv1", "PLCMOSv2", "
|
471 |
|
472 |
with tab1:
|
473 |
st.header("PESQ")
|
@@ -482,8 +482,8 @@ if st.button('Сгенерировать потери'):
|
|
482 |
st.header("PLCMOSv2")
|
483 |
st.bar_chart(df_1, x="Аудио", y="PLCMOSv2")
|
484 |
with tab5:
|
485 |
-
st.header("
|
486 |
-
st.bar_chart(df_1, x="Аудио", y="
|
487 |
#st.bar_chart(df_1, x="Audio", y="PESQ")
|
488 |
#st.bar_chart(df_1, x="Audio", y="STOI")
|
489 |
#st.bar_chart(df_1, x="Audio", y="PLCMOSv1")
|
|
|
424 |
error1 = wer(orig, orig)
|
425 |
error2 = wer(orig, lossy)
|
426 |
error3 = wer(orig, enhanced)
|
427 |
+
WAcc_mass=[(1-error1)*100, (1-error2)*100, (1-error3)*100]
|
428 |
|
429 |
+
df_1['WAcc'] = WAcc_mass
|
430 |
|
431 |
st.subheader('4. Метрики аудио')
|
432 |
#st.dataframe(df_1)
|
|
|
436 |
col2.metric("STOI", value = round(stoi_mass[0],3))
|
437 |
col3.metric("PLCMOSv1", value = round(PLC_massv1[0],3))
|
438 |
col4.metric("PLCMOSv2", value = round(PLC_massv2[0],3))
|
439 |
+
col5.metric("WAcc", value = round(WAcc_mass[0],3))
|
440 |
|
441 |
|
442 |
st.write("#### "+"С потерями")
|
|
|
445 |
col2.metric("STOI", value = round(stoi_mass[1],3), delta = str(round(-(abs(stoi_mass[1] - stoi_mass[0]) / stoi_mass[0]) * 100.0,3))+'%')
|
446 |
col3.metric("PLCMOSv1", value = round(PLC_massv1[1],3), delta = str(round(-(abs(PLC_massv1[1] - PLC_massv1[0]) / PLC_massv1[0]) * 100.0,3))+'%')
|
447 |
col4.metric("PLCMOSv2", value = round(PLC_massv2[1],3), delta = str(round(-(abs(PLC_massv2[1] - PLC_massv2[0]) / PLC_massv2[0]) * 100.0,3))+'%')
|
448 |
+
col5.metric("WAcc", value = round(WAcc_mass[1],3), delta = str(round(-(abs(WAcc_mass[1] - WAcc_mass[0]) / WAcc_mass[0]) * 100.0,3))+'%')
|
449 |
|
450 |
|
451 |
st.write("#### "+"Улучшенное")
|
|
|
458 |
col3.metric("PLCMOSv1", value = round(PLC_massv1[2],3), delta = PLCv1_s + str(round((abs(PLC_massv1[2] - PLC_massv1[1]) / PLC_massv1[1]) * 100.0,3))+'%')
|
459 |
PLCv2_s = sign_x_y(PLC_massv2[1], PLC_massv2[2])
|
460 |
col4.metric("PLCMOSv2", value = round(PLC_massv2[2],3), delta = PLCv2_s + str(round((abs(PLC_massv2[2] - PLC_massv2[1]) / PLC_massv2[1]) * 100.0,3))+'%')
|
461 |
+
WER_s = sign_x_y(WAcc_mass[1], WAcc_mass[2])
|
462 |
+
if WAcc_mass[1]==0:
|
463 |
+
if WAcc_mass[2]!=0:
|
464 |
+
col5.metric("WAcc", value = round(WAcc_mass[2],3), delta = WER_s + str(round((abs(WAcc_mass[2] - 0.001) / 0.001) * 100.0,3))+'%')
|
465 |
else:
|
466 |
+
col5.metric("WAcc", value = round(WAcc_mass[2],3))
|
467 |
else:
|
468 |
+
col5.metric("WAcc", value = round(WAcc_mass[2],3), delta = WER_s + str(round((abs(WAcc_mass[2] - WAcc_mass[1]) / WAcc_mass[1]) * 100.0,3))+'%')
|
469 |
|
470 |
+
tab1, tab2, tab3, tab4, tab5 = st.tabs(["PESQ", "STOI", "PLCMOSv1", "PLCMOSv2", "WAcc"])
|
471 |
|
472 |
with tab1:
|
473 |
st.header("PESQ")
|
|
|
482 |
st.header("PLCMOSv2")
|
483 |
st.bar_chart(df_1, x="Аудио", y="PLCMOSv2")
|
484 |
with tab5:
|
485 |
+
st.header("WAcc")
|
486 |
+
st.bar_chart(df_1, x="Аудио", y="WAcc")
|
487 |
#st.bar_chart(df_1, x="Audio", y="PESQ")
|
488 |
#st.bar_chart(df_1, x="Audio", y="STOI")
|
489 |
#st.bar_chart(df_1, x="Audio", y="PLCMOSv1")
|