-
Notifications
You must be signed in to change notification settings - Fork 0
/
perceptual_app.py
49 lines (37 loc) · 1.32 KB
/
perceptual_app.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
import os
import sys
import streamlit as st
from perceptual import subjective_eval
st.write("""
# A Perceptual Measure for Evaluating the Resynthesis of Automatic Music Transcriptions
_Federico Simonetta, Federico Avanzini, Stavros Ntalampiras_
""")
st.write("To generate this file in html format use the following command: `" +
"streamlit run " + os.path.basename(__file__) +
" ".join(sys.argv[1:]) + "`")
args = ['dummy_arg']
variable = st.selectbox(
"Chose control group:",
('expertise', 'headphones', 'habits_classical', 'habits_general', 'all'),
index=4)
args.append(variable)
measure = st.selectbox("Chose measure to compare:",
('mir_eval', 'peamt', 'our_eval'),
index=0)
args.append(measure)
average = st.checkbox("Use average of all the excerpts", value=True)
if average:
args.append("average")
args += sys.argv
order = st.radio(
"Chose the variable that is iterated first (external loop) and next (inner loop):",
('1. task, 2. method', '1. method, 2. task'),
index=0)
if order == '1. task, 2. method':
var1, var2 = 'task', 'method'
else:
var2, var1 = 'task', 'method'
print(f"Using args: {args}")
subjective_eval.main(args, var1=var1, var2=var2)
print("Ended computing!")
print("This script stays open to leave the server up!")