Sylvain Filoni commited on
Commit
e5b0363
โ€ข
1 Parent(s): 7fb6157

css tweaks

Browse files
Files changed (1) hide show
  1. app.py +12 -12
app.py CHANGED
@@ -90,7 +90,7 @@ def convert_mp3_to_wav(mp3_filepath):
90
  return wave_file
91
 
92
  css = """
93
- #col-container {max-width: 700px; margin-left: auto; margin-right: auto;}
94
  a {text-decoration-line: underline; font-weight: 600;}
95
  .animate-spin {
96
  animation: spin 1s linear infinite;
@@ -144,18 +144,18 @@ with gr.Blocks(css=css) as demo:
144
  </div>""")
145
 
146
 
147
- input_img = gr.Image(type="filepath", elem_id="input-img")
148
- with gr.Row():
149
- track_duration = gr.Slider(minimum=20, maximum=120, value=30, step=5, label="Track duration", elem_id="duration-inp")
150
- gen_intensity = gr.Dropdown(choices=["low", "medium", "high"], value="high", label="Complexity")
151
- generate = gr.Button("Generate Music from Image")
152
-
153
- music_output = gr.Audio(label="Result", type="filepath", elem_id="music-output")
154
 
155
- with gr.Group(elem_id="share-btn-container"):
156
- community_icon = gr.HTML(community_icon_html, visible=False)
157
- loading_icon = gr.HTML(loading_icon_html, visible=False)
158
- share_button = gr.Button("Share to community", elem_id="share-btn", visible=False)
 
 
159
 
160
  generate.click(get_prompts, inputs=[input_img,track_duration,gen_intensity], outputs=[music_output, share_button, community_icon, loading_icon], api_name="i2m")
161
  share_button.click(None, [], [], _js=share_js)
 
90
  return wave_file
91
 
92
  css = """
93
+ #col-container {max-width: 550px; margin-left: auto; margin-right: auto;}
94
  a {text-decoration-line: underline; font-weight: 600;}
95
  .animate-spin {
96
  animation: spin 1s linear infinite;
 
144
  </div>""")
145
 
146
 
147
+ input_img = gr.Image(type="filepath", elem_id="input-img")
148
+ with gr.Row():
149
+ track_duration = gr.Slider(minimum=20, maximum=120, value=30, step=5, label="Track duration", elem_id="duration-inp")
150
+ gen_intensity = gr.Dropdown(choices=["low", "medium", "high"], value="high", label="Complexity", show_label=False)
151
+ generate = gr.Button("Generate Music from Image")
 
 
152
 
153
+ music_output = gr.Audio(label="Result", type="filepath", elem_id="music-output")
154
+
155
+ with gr.Group(elem_id="share-btn-container"):
156
+ community_icon = gr.HTML(community_icon_html, visible=False)
157
+ loading_icon = gr.HTML(loading_icon_html, visible=False)
158
+ share_button = gr.Button("Share to community", elem_id="share-btn", visible=False)
159
 
160
  generate.click(get_prompts, inputs=[input_img,track_duration,gen_intensity], outputs=[music_output, share_button, community_icon, loading_icon], api_name="i2m")
161
  share_button.click(None, [], [], _js=share_js)