Spaces:
Runtime error
Runtime error
Commit
•
baf9728
1
Parent(s):
dd3cb6b
Update app.py
Browse files
app.py
CHANGED
@@ -74,11 +74,12 @@ def process(input_path):
|
|
74 |
str(dict_desc['Articulation']),
|
75 |
str(dict_desc['RhythmicStability']),
|
76 |
str(dict_desc['Dissonance']),
|
77 |
-
str(dict_desc['
|
78 |
-
|
79 |
-
|
80 |
-
('
|
81 |
-
|
|
|
82 |
|
83 |
|
84 |
with gr.Blocks() as demo:
|
@@ -104,7 +105,14 @@ with gr.Blocks() as demo:
|
|
104 |
with gr.Column():
|
105 |
gr.HTML("<h3>Genres</h3>")
|
106 |
genres = gr.Label(label="Genres", show_label=False)
|
107 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
108 |
with gr.Column():
|
109 |
gr.HTML("<h3>Instruments</h3>")
|
110 |
instruments = gr.Label(label="Instruments", show_label=False)
|
@@ -112,7 +120,19 @@ with gr.Blocks() as demo:
|
|
112 |
with gr.Column():
|
113 |
gr.HTML("<h3> Descriptors</h3>")
|
114 |
#gr.HTML("<h5> Vocal/Instrumental</h5>")
|
115 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
116 |
|
117 |
|
118 |
''''
|
@@ -122,7 +142,28 @@ with gr.Blocks() as demo:
|
|
122 |
gr.HTML("<h3>Themes</h3>")
|
123 |
themes=gr.Label(label="Themes", show_label=False)
|
124 |
'''
|
125 |
-
|
126 |
-
analyze_btn.click(process, inputs=[audio_input],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
127 |
|
128 |
demo.launch(debug=False)
|
|
|
74 |
str(dict_desc['Articulation']),
|
75 |
str(dict_desc['RhythmicStability']),
|
76 |
str(dict_desc['Dissonance']),
|
77 |
+
str(dict_desc['BPM']),
|
78 |
+
str(dict_desc['Binary']),
|
79 |
+
str(dict_desc['Key']),
|
80 |
+
str(dict_desc['Mode']),
|
81 |
+
str(dict_desc['TexturalStability'])
|
82 |
+
|
83 |
|
84 |
|
85 |
with gr.Blocks() as demo:
|
|
|
105 |
with gr.Column():
|
106 |
gr.HTML("<h3>Genres</h3>")
|
107 |
genres = gr.Label(label="Genres", show_label=False)
|
108 |
+
|
109 |
+
gr.HTML("<h3>BPM</h3>")
|
110 |
+
bpm = gr.TextBox(label="BPM", show_label=False)
|
111 |
+
|
112 |
+
gr.HTML("<h3>Key</h3>")
|
113 |
+
key = gr.TextBox(label="Key", show_label=False)
|
114 |
+
mode = gr.TextBox(label="Mode", show_label=False)
|
115 |
+
|
116 |
with gr.Column():
|
117 |
gr.HTML("<h3>Instruments</h3>")
|
118 |
instruments = gr.Label(label="Instruments", show_label=False)
|
|
|
120 |
with gr.Column():
|
121 |
gr.HTML("<h3> Descriptors</h3>")
|
122 |
#gr.HTML("<h5> Vocal/Instrumental</h5>")
|
123 |
+
acousticness = gr.Slider(label="Electric/Acoustic", minimum=0, maximum=1.0)#, info="Information todo", show_label=False)
|
124 |
+
danceability = gr.Slider(label="Danceability", minimum=0, maximum=1.0)#, info="Information todo", show_label=False)
|
125 |
+
arousal = gr.Slider(label="Arousal", minimum=0, maximum=1.0)#, info="Information todo", show_label=False)
|
126 |
+
instrumentalness = gr.Slider(label="Vocal/Instrumental", minimum=0, maximum=1.0)#, info="Information todo", show_label=False)
|
127 |
+
liveness = gr.Slider(label="Studio/Live", minimum=0, maximum=1.0)#, info="Information todo", show_label=False)
|
128 |
+
speechiness = gr.Slider(label="Music/Speech", minimum=0, maximum=1.0)#, info="Information todo", show_label=False)
|
129 |
+
valence = gr.Slider(label="Valence", minimum=0, maximum=1.0)#, info="Information todo", show_label=False)
|
130 |
+
melodic = gr.Slider(label="Melodic", minimum=0, maximum=1.0)#, info="Information todo", show_label=False)
|
131 |
+
articulation = gr.Slider(label="Articulation", minimum=0, maximum=1.0)#, info="Information todo", show_label=False)
|
132 |
+
rhytmicstability = gr.Slider(label="Rhythmic Stability", minimum=0, maximum=1.0)#, info="Information todo", show_label=False)
|
133 |
+
dissonance = gr.Slider(label="Dissonance", minimum=0, maximum=1.0)#, info="Information todo", show_label=False)
|
134 |
+
binary = gr.Slider(label="Binary", minimum=0, maximum=1.0)#, info="Information todo", show_label=False)
|
135 |
+
texturalstability = gr.Slider(label="Textural Stability", minimum=0, maximum=1.0)#, info="Information todo", show_label=False)
|
136 |
|
137 |
|
138 |
''''
|
|
|
142 |
gr.HTML("<h3>Themes</h3>")
|
143 |
themes=gr.Label(label="Themes", show_label=False)
|
144 |
'''
|
145 |
+
|
146 |
+
analyze_btn.click(process, inputs=[audio_input],
|
147 |
+
outputs=[dict_moods,
|
148 |
+
genres,
|
149 |
+
instruments,
|
150 |
+
themes,
|
151 |
+
acousticness,
|
152 |
+
danceability,
|
153 |
+
arousal,
|
154 |
+
instrumentalness,
|
155 |
+
liveness,
|
156 |
+
speechiness,
|
157 |
+
valence,
|
158 |
+
melodic,
|
159 |
+
articulation,
|
160 |
+
rhythmicstability,
|
161 |
+
dissonance,
|
162 |
+
bpm,
|
163 |
+
binary,
|
164 |
+
key,
|
165 |
+
mode,
|
166 |
+
texturalstability
|
167 |
+
])
|
168 |
|
169 |
demo.launch(debug=False)
|