fffiloni commited on
Commit
f394239
β€’
1 Parent(s): ade087a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -32,7 +32,7 @@ def get_music(prompt):
32
  β€”β€”β€”β€”β€”β€”β€”
33
  """)
34
 
35
- return result
36
 
37
  css = """
38
  #col-container {max-width: 700px; margin-left: auto; margin-right: auto;}
@@ -62,10 +62,11 @@ with gr.Blocks(css=css) as demo:
62
  </div>""")
63
 
64
  with gr.Column():
65
- input_img = gr.Image(type="filepath")
66
  generate = gr.Button("Generate Music from Image")
67
  with gr.Column():
68
  music_output = gr.Audio(label="Result", type="filepath")
69
- generate.click(get_prompts, inputs=[input_img], outputs=[music_output])
 
70
 
71
  demo.queue(max_size=32, concurrency_count=20).launch()
 
32
  β€”β€”β€”β€”β€”β€”β€”
33
  """)
34
 
35
+ return result, result
36
 
37
  css = """
38
  #col-container {max-width: 700px; margin-left: auto; margin-right: auto;}
 
62
  </div>""")
63
 
64
  with gr.Column():
65
+ input_img = gr.Image(type="filepath", elem_id="input-img")
66
  generate = gr.Button("Generate Music from Image")
67
  with gr.Column():
68
  music_output = gr.Audio(label="Result", type="filepath")
69
+ output_text = gr.Textbox(label="Output", elem_id="output-txt", visible=False)
70
+ generate.click(get_prompts, inputs=[input_img], outputs=[music_output, output_text])
71
 
72
  demo.queue(max_size=32, concurrency_count=20).launch()