Spaces:
Runtime error
Runtime error
Commit
•
a0f11fa
1
Parent(s):
dba77dd
Update app.py
Browse files
app.py
CHANGED
@@ -62,7 +62,7 @@ def process(input_path):
|
|
62 |
audioquality = [res['audio_quality'][0]['name'], res['audio_quality'][0]['probability']]
|
63 |
print(audioquality)
|
64 |
|
65 |
-
return dict_moods, genres, instruments, themes, str(dict_desc['Vocal/Instrumental'])
|
66 |
|
67 |
'''
|
68 |
demo = gr.Interface(fn=process,
|
@@ -87,7 +87,7 @@ with gr.Blocks() as demo:
|
|
87 |
analyze_btn = gr.Button('Analyze File')
|
88 |
|
89 |
with gr.Row():
|
90 |
-
dict_moods=gr.Label(label="Moods")
|
91 |
themes=gr.Label(label="Themes")
|
92 |
genres = gr.Label(label="Genres")
|
93 |
instruments = gr.Label(label="Instruments")
|
@@ -107,9 +107,11 @@ with gr.Blocks() as demo:
|
|
107 |
'''
|
108 |
#themes = gr.Dataset(components=[gr.Textbox(visible=False)],label="type de tags")
|
109 |
|
110 |
-
|
|
|
|
|
111 |
|
112 |
|
113 |
-
analyze_btn.click(process, inputs=[audio_input], outputs=[dict_moods, genres, instruments, themes, dict_desc
|
114 |
|
115 |
demo.launch(debug=False)
|
|
|
62 |
audioquality = [res['audio_quality'][0]['name'], res['audio_quality'][0]['probability']]
|
63 |
print(audioquality)
|
64 |
|
65 |
+
return dict_moods, genres, instruments, themes, str(dict_desc['Vocal/Instrumental']), str(dict_desc['Vocal/Instrumental'])
|
66 |
|
67 |
'''
|
68 |
demo = gr.Interface(fn=process,
|
|
|
87 |
analyze_btn = gr.Button('Analyze File')
|
88 |
|
89 |
with gr.Row():
|
90 |
+
dict_moods=gr.Label(label="Moods", show_label=False)
|
91 |
themes=gr.Label(label="Themes")
|
92 |
genres = gr.Label(label="Genres")
|
93 |
instruments = gr.Label(label="Instruments")
|
|
|
107 |
'''
|
108 |
#themes = gr.Dataset(components=[gr.Textbox(visible=False)],label="type de tags")
|
109 |
|
110 |
+
with gr.Column():
|
111 |
+
dict_desc = gr.Textbox(label="music desc")
|
112 |
+
vocalinstru = gr.Textbox(label="Vocal/Instrumental")
|
113 |
|
114 |
|
115 |
+
analyze_btn.click(process, inputs=[audio_input], outputs=[dict_moods, genres, instruments, themes, dict_desc, vocalinstru])
|
116 |
|
117 |
demo.launch(debug=False)
|