Commit
·
be32163
1
Parent(s):
2b4b5d9
Update app.py
Browse files
app.py
CHANGED
@@ -17,18 +17,18 @@ def main():
|
|
17 |
"""
|
18 |
)
|
19 |
|
20 |
-
with gr.Column():
|
21 |
audio_input = gr.Audio(type='filepath')
|
22 |
with gr.Row():
|
23 |
create_spec_butt = gr.Button(value='Create Spectrogram And Get Info')
|
24 |
clear_audio_butt = gr.Button(value='Clear', variant='primary')
|
25 |
|
26 |
-
with gr.Column():
|
27 |
-
output_markdown = gr.Markdown()
|
28 |
image_output = gr.Image(type='filepath', interactive=False)
|
29 |
|
30 |
-
clear_audio_butt.click(fn=lambda: {"value": "", "__type__": "update"}, inputs=[], outputs=[audio_input])
|
31 |
create_spec_butt.click(fn=create_spectrogram_and_get_info, inputs=[audio_input], outputs=[output_markdown, image_output])
|
|
|
32 |
|
33 |
app.queue(max_size=1022).launch(share=True)
|
34 |
|
|
|
17 |
"""
|
18 |
)
|
19 |
|
20 |
+
with gr.Column(elem_id=1):
|
21 |
audio_input = gr.Audio(type='filepath')
|
22 |
with gr.Row():
|
23 |
create_spec_butt = gr.Button(value='Create Spectrogram And Get Info')
|
24 |
clear_audio_butt = gr.Button(value='Clear', variant='primary')
|
25 |
|
26 |
+
with gr.Column(elem_id=2):
|
27 |
+
output_markdown = gr.Markdown(value="", visible=True)
|
28 |
image_output = gr.Image(type='filepath', interactive=False)
|
29 |
|
|
|
30 |
create_spec_butt.click(fn=create_spectrogram_and_get_info, inputs=[audio_input], outputs=[output_markdown, image_output])
|
31 |
+
clear_audio_butt.click(fn=lambda: {"value": "", "__type__": "update"}, inputs=[], outputs=[audio_input])
|
32 |
|
33 |
app.queue(max_size=1022).launch(share=True)
|
34 |
|