PierreHanna commited on
Commit
558bd35
1 Parent(s): 17c7837

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -20
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']), str(dict_desc['Vocal/Instrumental'])
66
 
67
  '''
68
  demo = gr.Interface(fn=process,
@@ -90,8 +90,10 @@ with gr.Blocks() as demo:
90
  with gr.Column():
91
  gr.HTML("<h3>Moods</h3>")
92
  dict_moods=gr.Label(label="Moods", show_label=False)
93
- #gr.Textbox("Hello")
94
-
 
 
95
  with gr.Column():
96
  gr.HTML("<h3>Genres</h3>")
97
  genres = gr.Label(label="Genres", show_label=False)
@@ -103,29 +105,17 @@ with gr.Blocks() as demo:
103
  with gr.Column():
104
  gr.HTML("<h3> Descriptors</h3>")
105
  gr.HTML("<h5> Vocal/Instrumental</h5>")
106
- dict_desc = gr.Textbox()
107
  #vocalinstru = gr.Textbox(label="Vocal/Instrumental")
108
- vocalinstru = gr.Slider(label="Vocal/Instrumental", minimum=0, maximum=1.0, info="Information todo")
109
-
110
  with gr.Row():
111
 
112
  with gr.Column():
113
  gr.HTML("<h3>Themes</h3>")
114
  themes=gr.Label(label="Themes", show_label=False)
115
-
116
- '''
117
- themes = gr.Dataset(components=[gr.Textbox(visible=False)],
118
- label="type de tags",
119
- samples=[
120
- ["Tag1"],
121
- ["Tag2"],
122
- ["Tag3"],
123
- ["Tag4"]
124
- ],
125
- )
126
- '''
127
- #themes = gr.Dataset(components=[gr.Textbox(visible=False)],label="type de tags")
128
 
129
- analyze_btn.click(process, inputs=[audio_input], outputs=[dict_moods, genres, instruments, themes, dict_desc, vocalinstru])
130
 
131
  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']))
66
 
67
  '''
68
  demo = gr.Interface(fn=process,
 
90
  with gr.Column():
91
  gr.HTML("<h3>Moods</h3>")
92
  dict_moods=gr.Label(label="Moods", show_label=False)
93
+
94
+ gr.HTML("<h3>Themes</h3>")
95
+ themes=gr.Label(label="Themes", show_label=False)
96
+
97
  with gr.Column():
98
  gr.HTML("<h3>Genres</h3>")
99
  genres = gr.Label(label="Genres", show_label=False)
 
105
  with gr.Column():
106
  gr.HTML("<h3> Descriptors</h3>")
107
  gr.HTML("<h5> Vocal/Instrumental</h5>")
108
+ #dict_desc = gr.Textbox()
109
  #vocalinstru = gr.Textbox(label="Vocal/Instrumental")
110
+ vocalinstru = gr.Slider(label="Vocal/Instrumental", minimum=0, maximum=1.0, info="Information todo", show_label=False)
111
+ ''''
112
  with gr.Row():
113
 
114
  with gr.Column():
115
  gr.HTML("<h3>Themes</h3>")
116
  themes=gr.Label(label="Themes", show_label=False)
117
+ '''
 
 
 
 
 
 
 
 
 
 
 
 
118
 
119
+ analyze_btn.click(process, inputs=[audio_input], outputs=[dict_moods, genres, instruments, themes, vocalinstru])
120
 
121
  demo.launch(debug=False)