PierreHanna commited on
Commit
dd3cb6b
1 Parent(s): 5ce521e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +22 -15
app.py CHANGED
@@ -62,17 +62,24 @@ 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,
69
- inputs=gr.Audio(type="filepath"),
70
- outputs=gr.outputs.Label(label="Moods"),
71
- #outputs=gr.outputs.Textbox(label="Generated Text")
72
- #examples=example_list,
73
- #cache_examples=False
74
- )
75
- '''
 
 
 
 
 
 
 
76
 
77
  with gr.Blocks() as demo:
78
 
@@ -104,10 +111,10 @@ with gr.Blocks() as demo:
104
 
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
 
 
62
  audioquality = [res['audio_quality'][0]['name'], res['audio_quality'][0]['probability']]
63
  print(audioquality)
64
 
65
+ return dict_moods, genres, instruments, themes,
66
+ str(dict_desc['Electric/Acoustic']),
67
+ str(dict_desc['Danceability']),
68
+ str(dict_desc['Arousal']),
69
+ str(dict_desc['Vocal/Instrumental']),
70
+ str(dict_desc['Studio/Live']),
71
+ str(dict_desc['Music/Speech']),
72
+ str(dict_desc['Valence']),
73
+ str(dict_desc['Melodic']),
74
+ str(dict_desc['Articulation']),
75
+ str(dict_desc['RhythmicStability']),
76
+ str(dict_desc['Dissonance']),
77
+ str(dict_desc['Vocal/Instrumental']),
78
+
79
+
80
+ ('BPM', 47), ('Binary', 0.794377), ('Key', 10), ('Mode', 1), ('TexturalStability', 0.312802)]
81
+
82
+
83
 
84
  with gr.Blocks() as demo:
85
 
 
111
 
112
  with gr.Column():
113
  gr.HTML("<h3> Descriptors</h3>")
114
+ #gr.HTML("<h5> Vocal/Instrumental</h5>")
115
+ vocalinstru = gr.Slider(label="Vocal/Instrumental", minimum=0, maximum=1.0)#, info="Information todo", show_label=False)
116
+
117
+
118
  ''''
119
  with gr.Row():
120