In [2]:
import pandas as pd
from ipywidgets import widgets
from IPython.display import display, Audio
from IPython.core.display import display, HTML
from evaluation_load import load_interface1, load_interface2, search_sounds_and_show_results, load_personal, load_questions
Go on by clicking on "Run cell" button (above us). DO NOT click again on "Run cell" button unless you have gone to next cell. Please, in order to continue with the questionarie, click manually on next cell and then click on "Run cell" button.
Definitions:
DISPLAY PRELIMINARY INTERFACE. CHOOSE INSTRUMENT AND CATEGORY CLASSES AND AS MANY HIGH-LEVEL DESCRIPTORS AS YOU WANT.
In [3]:
instrument, category, accordion = load_interface1()
check1, slider1, check2, slider2, check3, slider3, check4, slider4 = load_interface2()
display(accordion)
display(check1,slider1)
display(check2,slider2)
display(check3,slider3)
display(check4,slider4)
DISPLAY RETRIEVED DRUM SAMPLE.
In [4]:
search_sounds_and_show_results(instrument, category, check1, slider1, check2, slider2, check3, slider3, check4, slider4)
WRITE YOUR NAME AND SELECT YOUR MUSICAL EXPERIENCE
In [5]:
name,exp,exp2 = load_personal()
display(name,exp,exp2)
ANSWER THE FOLLOWING QUESTIONS:
In [6]:
response1, response2, response3 = load_questions()
print "Does the retrieved sample really correspond to the expected drum instrument class?"
display(response1)
In [7]:
print "Does the retrieved sample really correspond to the expected drum category class?"
display(response2)
In [8]:
print "Select how you think the system has interpreted your selection based on High-Level Descriptors."
display(response3)
GATHER ANSWERS INFORMATION.
In [9]:
if check1.value is True:
bright = slider1.value
else:
bright = 'NaN'
if check2.value is True:
depth = slider2.value
else:
depth = 'NaN'
if check3.value is True:
hard = slider3.value
else:
hard = 'NaN'
if check4.value is True:
rough = slider4.value
else:
rough = 'NaN'
print "User name: " + name.value, "\n", "Musical experience as: " + exp.value[0], "\n", "Years of experience: " + exp2.value[0], "\n"
print "Instrument: " + instrument.value, "\n", "Category: " + category.value, "\n"
print "Brightness: " + str(bright), "\n", "Depth: " + str(depth), "\n", "Hardness: " + str(hard), "\n", "Roughness: " + str(rough), "\n"
print "Correct instrument? " + response1.value, "\n", "Correct category? " + response2.value, "\n", "High-level descriptors? "+response3.value, "\n"
ADD TO CSV.
In [9]:
df = pd.read_csv('test.csv',index_col=0)
d = [name.value,exp.value[0],exp2.value[0],instrument.value,category.value,bright,depth,hard,rough,response1.value,response2.value,response3.value]
df.loc[len(df)] = [d[n] for n in range(len(df.columns))]
df.to_csv('test.csv')
df
Out[9]:
RESET VARIABLES AND START AGAIN TO EVALUATE A NEW DRUM SAMPLE.
In [ ]:
%reset
In [ ]: