Commit
·
bbc007c
1
Parent(s):
e24f6c8
Update app.py
Browse files
app.py
CHANGED
@@ -7,25 +7,27 @@ import soundfile as sf
|
|
7 |
def main():
|
8 |
# Gradio Interface
|
9 |
with gr.Blocks() as app:
|
10 |
-
gr.
|
11 |
-
|
12 |
-
|
13 |
-
|
|
|
|
|
14 |
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
|
19 |
-
|
20 |
|
21 |
-
|
22 |
-
|
23 |
|
24 |
-
|
25 |
|
26 |
-
|
27 |
|
28 |
-
|
29 |
|
30 |
def create_spectrogram_and_get_info(audio_file):
|
31 |
# Clear figure in case it has data in it
|
|
|
7 |
def main():
|
8 |
# Gradio Interface
|
9 |
with gr.Blocks() as app:
|
10 |
+
with gr.Group():
|
11 |
+
gr.Markdown(
|
12 |
+
"""
|
13 |
+
# <div align="center"> Ilaria Audio Analyzer 💖 </div>
|
14 |
+
Audio Analyzer Software by Ilaria, Help me on [Ko-Fi](https://ko-fi.com/ilariaowo)\n
|
15 |
+
Special thanks to [Alex Murkoff](https://github.com/alexlnkp) for helping me coding it!
|
16 |
|
17 |
+
Need help with AI? [Join AI Hub!](https://discord.gg/aihub)
|
18 |
+
"""
|
19 |
+
)
|
20 |
|
21 |
+
output_markdown = gr.Markdown()
|
22 |
|
23 |
+
audio_input = gr.Audio(type='filepath')
|
24 |
+
image_output = gr.Image(type='filepath', interactive=False)
|
25 |
|
26 |
+
create_spec_butt = gr.Button(value='Create Spectrogram And Get Info')
|
27 |
|
28 |
+
create_spec_butt.click(fn=create_spectrogram_and_get_info, inputs=[audio_input], outputs=[output_markdown, image_output])
|
29 |
|
30 |
+
app.queue(max_size=1022).launch(share=True)
|
31 |
|
32 |
def create_spectrogram_and_get_info(audio_file):
|
33 |
# Clear figure in case it has data in it
|