Update app.py
Browse files
app.py
CHANGED
@@ -254,27 +254,39 @@ if st.button('Сгенерировать потери'):
|
|
254 |
|
255 |
|
256 |
|
257 |
-
|
258 |
|
259 |
-
|
260 |
|
261 |
-
|
262 |
|
263 |
-
|
264 |
|
265 |
#df['LSD'] = lsd_mass
|
266 |
-
|
267 |
-
|
|
|
|
|
|
|
268 |
|
269 |
|
270 |
PLC_massv2 = [plcmos.run("target.wav", sr=16000)['plcmos'], plcmos.run("lossy.wav", sr=16000)['plcmos'], plcmos.run("enhanced.wav", sr=16000)['plcmos']]
|
271 |
|
272 |
-
|
|
|
|
|
|
|
|
|
273 |
|
274 |
-
|
275 |
|
|
|
|
|
|
|
|
|
|
|
276 |
|
277 |
-
st.
|
278 |
|
279 |
|
280 |
|
|
|
254 |
|
255 |
|
256 |
|
257 |
+
df_1 = pd.DataFrame(columns=['Audio', 'PESQ', 'STOI', 'PLCMOSv1'])
|
258 |
|
259 |
+
df_1['Audio'] = ['Clean', 'Lossy', 'Enhanced']
|
260 |
|
261 |
+
df_1['PESQ'] = psq_mas
|
262 |
|
263 |
+
df_1['STOI'] = stoi_mass
|
264 |
|
265 |
#df['LSD'] = lsd_mass
|
266 |
+
df_1['PLCMOSv1'] = PLC_mass
|
267 |
+
new_columns = pd.MultiIndex.from_tuples([('', 'Audio'), ('Эталонные метрики', 'PESQ'), ('Эталонные метрики', 'STOI'), ('Эталонные метрики', 'PLCMOSv1')])
|
268 |
+
|
269 |
+
# Присваиваем новый мультииндекс столбцам
|
270 |
+
df_1.columns = new_columns
|
271 |
|
272 |
|
273 |
PLC_massv2 = [plcmos.run("target.wav", sr=16000)['plcmos'], plcmos.run("lossy.wav", sr=16000)['plcmos'], plcmos.run("enhanced.wav", sr=16000)['plcmos']]
|
274 |
|
275 |
+
DNS = [dnsmos.run("target.wav", sr=16000)['ovrl_mos'], dnsmos.run("lossy.wav", sr=16000)['ovrl_mos'], dnsmos.run("enhanced.wav", sr=16000)['ovrl_mos']]
|
276 |
+
|
277 |
+
df_2 = pd.DataFrame(columns=['DNSMOS', 'PLCMOSv2'])
|
278 |
+
|
279 |
+
df_2['DNSMOS'] = DNS
|
280 |
|
281 |
+
df_2['PLCMOSv2'] = PLC_massv2
|
282 |
|
283 |
+
new_columns = pd.MultiIndex.from_tuples([('Неэталонные метрики', 'DNSMOS'), ('Неэталонные метрики', 'PLCMOSv2')])
|
284 |
+
|
285 |
+
# Присваиваем новый мультииндекс столбцам
|
286 |
+
df_2.columns = new_columns
|
287 |
+
df_merged = df_1.merge(df_2, left_index=True, right_index=True)
|
288 |
|
289 |
+
st.dataframe(df_merged)
|
290 |
|
291 |
|
292 |
|