PierreHanna commited on
Commit
5a85c5b
·
1 Parent(s): f88dee9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -62,8 +62,8 @@ def process(input_path):
62
  audioquality = [res['audio_quality'][0]['name'], res['audio_quality'][0]['probability']]
63
  print(audioquality)
64
 
65
- return dict_moods, dict_desc, genres, instruments, themes
66
-
67
  '''
68
  demo = gr.Interface(fn=process,
69
  inputs=gr.Audio(type="filepath"),
@@ -91,7 +91,7 @@ with gr.Blocks() as demo:
91
  #themes=gr.Label(label="Themes")
92
  genres = gr.Label(label="Genres")
93
  instruments = gr.Label(label="Instruments")
94
- dict_desc = gr.Textbox(label="music desc")
95
 
96
  '''
97
  themes = gr.Dataset(components=[gr.Textbox(visible=False)],
@@ -105,9 +105,9 @@ with gr.Blocks() as demo:
105
  )
106
  '''
107
  themes = gr.Dataset(components=[gr.Textbox(visible=False)],label="type de tags")
 
108
 
109
-
110
- analyze_btn.click(process, inputs=[audio_input], outputs=[dict_moods, dict_desc, genres, instruments, themes])
111
  #audio_input.submit(process, inputs=[audio_input], outputs=[moods]) # pas de sens !
112
 
113
  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, dict_desc['Vocal/Instrumental']
66
+
67
  '''
68
  demo = gr.Interface(fn=process,
69
  inputs=gr.Audio(type="filepath"),
 
91
  #themes=gr.Label(label="Themes")
92
  genres = gr.Label(label="Genres")
93
  instruments = gr.Label(label="Instruments")
94
+ #dict_desc = gr.Textbox(label="music desc")
95
 
96
  '''
97
  themes = gr.Dataset(components=[gr.Textbox(visible=False)],
 
105
  )
106
  '''
107
  themes = gr.Dataset(components=[gr.Textbox(visible=False)],label="type de tags")
108
+ vocalinstru = gr.Textbox(label="Vocal/Instrumental"),
109
 
110
+ analyze_btn.click(process, inputs=[audio_input], outputs=[dict_moods, genres, instruments, themes, vocalinstru])
 
111
  #audio_input.submit(process, inputs=[audio_input], outputs=[moods]) # pas de sens !
112
 
113
  demo.launch(debug=False)